Download User`s Manual - TTC Technologies

Transcript
end for
Both examples above cause the premature termination of the for loop on
encountering the break statement. In the second case, the termination only occurs
on the condition of expression3.
A.6.2. Continue
This keyword is used only as a place holder. For instance, the continue keyword
may be used to establish a label. The presence of the continue keyword has no
effect whatsoever in a scripting segment. Examples are included in A.6.3.
A.6.3. Go to and labels
The goto statement is used to influence program flow. This statement is used in
conjunction with a label statement. The syntax is shown below.
…
goto :label
…
:label
The rules governing goto and label statements are as follows:



label is an alphanumeric word defined according to the rules for naming
variables as described in Section A.1. label words must not be declared.
“goto” or “go to” may be used.
… represents one or more lines of scripting language segments within the
same program or subprogram.
Example 1 (using the continue keyword):
Re = rho * U * L / mu
If (Re <= 2500) then
f = 16/Re
go to :2000
end if
f = 0.0064 *Re ^ 0.4
:2000 continue
Example 2 (using a label with an expression):
Re = rho * U * L / mu
86