Xylem XL-BASIC Programming Guide Manual de usuario Pagina 10

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 21
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 9
23-10 XL-BASIC Programming Guide XL™ SERIES
Example: goto 1000
end
1000
print "code execution continues here"
FOR / TO / NEXT This is a “For To” loop with the following form:
FOR var = start value TO end value
Command(s)
NEXT
Example: for x = 1 to 10
Print x
Next
The start value and end value must be whole numbers with the start value
less than the end value. There can be 5 nested FOR / TO / NEXT sections.
IF / THEN IF condition THEN action. Condition is a logical expression that
evaluates to true or false. If the condition is true then the
desired action is executed. Valid conditional operators are:
Operator Example
< a < b a less than b
> a > b a greater than b
<= a <= b a less than or equal to b
>= a >= b a greater than or equal to b
= = a = = b a equal to b
!= a != b a not equal to b
Example: if stage>10 then print "stage is greater than 10"
Most commands can be used after the THEN statement. A few
possibilities are listed below:
Then goto ####
Then gosub ####
Then measure(x)
Then delay(#)
END All programs should end with this statement.
Vista de pagina 9
1 2 ... 5 6 7 8 9 10 11 12 13 14 15 ... 20 21

Comentarios a estos manuales

Sin comentarios