beautypg.com

Campbell Scientific CR5000 Measurement and Control Module User Manual

Page 228

background image

Section 9. Program Control Instructions

9-22

StatementBlock

The StatementBlock is the portion of the program that
should be repeated until the loop is terminated. These
instructions lie between the While and Wend statements.

Wend

The Wend statement ends the While...Wend control
structure.

The Do...Loop statement provides more structure and a more
flexible way to perform looping.

While...Wend Statement Example
This example creates a While...Wend that is exited only if Reply is within a
range.

Dim Reply

'Declare variable.

While Reply < 90

Reply = Reply + 1

Wend

NOTE