PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Nesting
  • Special cases
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Factorizes the expression of an element on which several sub-elements or properties are accessed.
Versions 21 and later
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
New in version 21
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
Example
WITH File
.Item = 1
END
WITH Control
..X = 5
..Y = 6
END
WITH ClassVariable
.Member = 5
END
Syntax
WITH <Expression representing a base element>
   .<Sub-element>
   ..<Property>
  :<Member or attribute>
END
<WITH>:
Marks the beginning of statement block.
<Expression representing a base element>:
Element used. The following elements can be used:
  • the controls,
  • the HFSQL files,
  • the data sources,
  • the advanced types (Record, xmlNode, ...),
  • the structures,
  • the classes,
  • the .NET objects and the Windows Store app objects.
Caution: The expression representing the base element is evaluated once only.
<END>:
Marks the end of statement block.
Remarks

Nesting

The WITH blocks can be nested. However, the element on which the accesses to the sub-elements, properties or members are performed is always the element of the most inside block.
oo is gglCalendar
sTitle, sAuthorName are strings
WITH oo
sTitle = ..Title
WITH ..Author
sAuthorName = ..Name
END
END

Special cases

  • In a class method, you cannot access the members of the class with the <:Member> syntax inside a WITH block. The ':' operator is reserved to the element of the WITH block.
  • The debugger is used to view the sub-elements of the current WITH block.
Minimum required version
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment