Brightsign HD2000 BrightScript Reference Guide Manuale Utente Pagina 11

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 30
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 10
11
Not including the built-in string functions, there is only one string operation - concatenation, represented by
the plus symbol +.
Example Programs:
A$="A ROSE"
B$=" IS A ROSE"
C$=A$+B$+B$+B$+".'
PRINT C$
RUN
A ROSE IS A ROSE IS A ROSE IS A ROSE.
Logical Operators
We described how AND, OR and NOT can be used with relational expressions. For example,
100 IF A=C AND NOT(B>40) THEN 60 ELSE 50
AND, OR and NOT can also be used for bit manipulation, bitwise comparisons, and Boolean operations.
AND, OR and NOT convert their arguments to 32-bit, signed two's-complement integers. They then perform
the specified logical operation on them and return a result within the same range
The operations are performed in bitwise fashion; this means that each bit of the result is obtained by
examining the bit in the same position for each argument.
63 AND 16 = 16
-1 OR -2 = -1
Hex and Octal
Hex and octal constants use the following prefixes:
&H (hex constants)
&O (octal constants)
Example:
PRINT &H0ABC
RUN
2748
Vedere la pagina 10
1 2 ... 6 7 8 9 10 11 12 13 14 15 16 ... 29 30

Commenti su questo manuale

Nessun commento