WITH...ENDWITH
Syntax
![]()
Command
Mandatory parameter Optional parameter Mandatory keyword Optional keyword |
WITH <Object>
.<Object property> := <Value> | <Variable> := .<Object
property>
[.<Object property> := <Value> | <Variable>
:= .<Object property>
[.<Object property> := <Value> | <Variable>
:= .<Object property>
...
...]]
ENDWITH
Description
Within the WITH...ENDWITH section data values of a data object or object properties of other objects can be changed without typing the object name in the instruction before the first dot. The object name is given directly after the WITH command and will be stored (in the stack) by LION as the object to be changed within the WITH...ENDWITH section. Every instruction within this loop that would normally begin with the chosen object name and dot (.) can now be written as just the first dot, followed by the rest of the instruction.
Diagram
Returned value type
N.A.
Parameters
Parameter | Description |
Object property | Property or value that is to be changed for the object that is given after the WITH command. Please note that inside a WITH loop, each property has to be specified separately. This means that it is not possible to use assignments with the .* in combination with the WITH instruction. |
Example
.color := #665500
.font := garamond
.width := 800
frame2_color := .color
endwith
In the example above we basically say: "Within FRAME2 make the FRAME2.COLOR #66FF00, the FRAME2.FONT should be GARAMOND, and the FRAME2.WIDTH will be 800."