Brightsign BrightScript 3.0 Reference Manual Manual do Utilizador Página 46

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 75
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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 ::=
Vista de página 45
1 2 ... 41 42 43 44 45 46 47 48 49 50 51 ... 74 75

Comentários a estes Manuais

Sem comentários