Brightsign HD2000 BrightScript Reference Guide Bedienungsanleitung Seite 11

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 30
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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
Seitenansicht 10
1 2 ... 6 7 8 9 10 11 12 13 14 15 16 ... 29 30

Kommentare zu diesen Handbüchern

Keine Kommentare