ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage syntax / Structured statements
  • Nesting
  • Special cases
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Factorizes the expression of an element on which several subelements or properties are accessed.
Example
WITH Queue
	.Item = 1
END
WITH Control
	..X = 5
	..Y = 6
END
WITH ClassVariable
	.Member = 5
END
Syntax
WITH <Expression representing a base element>
   .<Subelement>
   ..<Property>
  :<Member or attribute>
END
<WITH>:
Marks the beginning of the statement block.
<Expression representing a base element>:
Element used. The following elements can be used:
  • the controls,
  • the HFSQL data files,
  • the data sources,
  • the advanced types (Record, xmlNode, ...),
  • the structures,
  • the classes,
  • the .NET objects and the Windows Store app objects.
Warning: The expression representing the base element is evaluated only once.
<END>:
Marks the end of the statement block.
Remarks

Nesting

The WITH blocks can be nested. However, the element on which the accesses to the subelements, 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 subelements of the current WITH block.
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 12/06/2024

Send a report | Local help