Maple Systems Silver Series Installation And Operation Manual page 290

Operator interface terminal
Hide thumbs Also See for Silver Series:
Table of Contents

Advertisement

Macros
Format
If Condition Then
[ Statements ]
Else
[else statements]
End If
A looping control statement is used for looping a pre-determined number of times. For counting up, use the
keyword To. For counting down, use the keyword Down. Counter Necessary. The counter of looping control. It
can be integer o character.
Start
Necessary. The initial value of Counter.
End
Necessary. The end value of Counter.
Step
Options. The increment decrement step of Counter. It can be integer an can be omitted when value is 1.
Statements
• Optional. Statement block between For and Next which will be executed.
Format
For counter = start To/Down end [Step
steps ]
[Statements]
Next [counter]
While – Wend state ment
Loop an unknown number of times. Looping is controlled by the Condition. When Condition is TRUE, the
statements will be executed repetitively until the condition turns to FALSE.
Condition
Necessary. An expression which evaluates to TRUE or FALSE.
Statements
Optional. Statement block.
Examples
If x == 1 Then
y = y * 5
z = z – 12
Else
y = y * 2
z=y-1
End If
If (x == 0 OR x == 1) AND y == 0 Then
z = 10
Else
z=5
End If
Examples
For n = 100 Down 0 Step 3
n = n * 2
Next n
For loop = 0 To 20 Step 2
loop = (loop + 1) *2
Next loop
285
1010-1007W, Rev 06

Advertisement

Table of Contents
loading

Related Products for Maple Systems Silver Series

This manual is also suitable for:

Hm15070thHm15100t

Table of Contents