while

Allows you to use the WHILE and END commands to execute a group of commands zero or more times. Adams View executes the commands that WHILE and END bracket repeatedly until the condition associated with the WHILE command is FALSE (zero).
You can nest any combination of looping (FOR/END, WHILE/END) and conditional constructs (IF/ELSE/ELSEIF/END).

Format:

 
while condition =
(expression)
...
 
end
 

Example:

 
variable create variable_name=ip integer_value=0
while condition=(ip < 10)
marker create marker_name=(eval("MAR"//ip+1)) &
location=(eval(ip)),0,0
variable modify variable_name=ip integer_value=(eval(ip+1))
end
variable delete variable_name=ip
 
In this example, Adams View creates 10 markers, MAR1 through MAR10, on the default part, and locates them one unit apart on the x-axis of the coordinate system.

Description:

 
Parameter
Value Type
Description
Condition
Expression
Adams View evaluates the value of an expression and executes the commands between the WHILE and the END command, if the value is non-zero. Adams View evaluates the expression at the end of the loop and continues looping as long as the value of the expression is non-zero.
 
Tip:  
You can use the EVAL function to get the value of an expression rather than assigning the expression itself. Use of the EVAL function with loops is described in FOR/END command of the Conditional Constructs & Loops section of Adams View online help.