Campbell Scientific CR800 and CR850 Measurement and Control Systems User Manual
Page 458

Appendix A. CRBasic Programming Instructions
458
Syntax
Do
[{While | Until} condition]
[statementblock]
[
ExitDo
]
[statementblock]
Loop
-or-
Do
[statementblock]
[
ExitDo
]
[statementblock]
Loop
[{While | Until} condition]
EndSequence
Ends the current sequence that started at BeginProg or after a SlowSequence
and accompanying declaration sequences.
Syntax
EndSequence
Exit
Exits program.
Syntax
Exit
For / Next
Repeats a group of instructions for a specified number of times.
Syntax
For
counter = start
To
end [ Step increment ]
[statement block]
[
ExitFor
]
[statement block]
Next
[counter [, counter][, ...]]
If / Then / Else / ElseIf / EndIf
Allows conditional execution, based on the evaluation of an expression. Else is
optional. ElseIf is optional. Note that EndSelect and EndIf call the same
function).
Syntax
If
[condition]
Then
[thenstatements]
Else
[elsestatements]
-or-
If
[condition 1] Then
[then statements]
ElseIf
[condition 2] Then
[elseif then statements]
Else
[else statements]
EndIf