Brightsign BrightScript 3.0 Reference Manual Manuel d'utilisateur Page 46

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 75
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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 ::=
Vue de la page 45
1 2 ... 41 42 43 44 45 46 47 48 49 50 51 ... 74 75

Commentaires sur ces manuels

Pas de commentaire