Statements>Loop Statements>Properties>Break
Caravan Business Server>Help>Statements>Loop Statements>
Properties
Break
|
Name
|
Break
|
Text
|
Used to terminate the loop Break transfers control to the statement immediately following the repeat. When used within nested Loop statements, Break transfers control to the loop that is nested one level above the loop where it occurs.
|
Sample
|
<HTML> <BODY> <CARAVAN> loop ctr (100) "The value of the counter is " ctr(counter)
if ctr(counter) = "50" break repeat ctr 101 </CARAVAN> </BODY> </HTML> Loop statements in Caravan can be nested to any number of levels .
End value of the loop statement can be replaced with a variable. But the end value of a repeat statement has to be a constant. Loops can be used to display array values and record sets directly.
|
|
Caravan Business Server>Help>Statements>Loop Statements>
Properties>
Count
|
Name
|
Count
|
Text
|
Index of the current loop
|
Sample
|
<HTML> <BODY> <CARAVAN> var temp temp(delim)="," temp(name)="John,Mary,Chris" loop ctr (temp(name(00))) ctr(counter);") ";temp(name(ctr(count))); repeat ctr 100 </CARAVAN> </BODY> </HTML>
|
|
Caravan Business Server>Help>Statements>Loop Statements>
Properties>
Counter
|
Name
|
Counter
|
Text
|
Numeric value used as a loop counter
|
Sample
|
<HTML> <BODY> <CARAVAN> var temp temp(delim)="," temp(name)="John,Mary,Chris" loop ctr (temp(name(00))) ctr(counter);") ";temp(name(ctr(count))); repeat ctr 100 </CARAVAN> </BODY> </HTML>
|
|
Home
Back
|
|