Brightsign BrightScript 3.0 Reference Manual Manuale Utente Pagina 46

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 75
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 45
41
Note: This is the single-line form of the IF THEN ELSE statement; see the next section for more details about the block
form of the IF THEN ELSE statement.
The IF statement instructs the interpreter to test the following expression. If the expression is True, control will proceed to
the statements immediately following the expression. If the expression is False, control will jump to either the matching
ELSE statement (if there is one) or to the next program line after the block.
Example:
if x>127 then print "out of range" : end
Note: THEN is optional in the above and similar statements. However, THEN is sometimes required to eliminate ambiguity,
as in the following example.
Example:
if y=m then m=o 'won't work without THEN
Block IF / ELSEIF / THEN / ENDIF
The block (i.e. multi-line) form of IF / THEN / ELSE has the following syntax:
If BooleanExpression [ Then ]
[ Block ]
[ ElseIfStatement+ ]
[ ElseStatement ]
End If
ElseIfStatement ::=
Vedere la pagina 45
1 2 ... 41 42 43 44 45 46 47 48 49 50 51 ... 74 75

Commenti su questo manuale

Nessun commento