Brightsign HD2000 BrightScript Reference Guide Bedienungsanleitung Seite 24

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 30
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 23
24
Built-in String Functions
ASC MID
CHR RIGHT
INSTR STR
INKEY STRING
LEN VAL
LEFT READASCIIFILE
ASC (string)
Returns the ASCII code (in decimal form) for the first character of the specified string. . A null-string
argument will cause an error to occur. Example:
100 PRINT ASC("A")
CHR (expression)
Performs the inverse of the ASC function: returns a one-character string whose character has the specified
ASCII, or control. Example:
PRINT CHR$(35) ‘prints a number-sign #
Using CHR$, you can assign quote-marks (normally used as string-delimiters) to strings. The ASCII code for
quotes - is 34. So A$=CHR$(34) assigns the value " to A$.
INSTR(position to start, text-to-search, substring-to-find)
Returns the position of a substring within a string. Returns 0 if the substring is not found.
The first position is 1. For example:
PRINT INSTR(1, “This is a test”, “is”)
will print 3
LEFT (string, n)
Returns the first n characters of string.
PRINT LEFT$(“Timothy”, 3) ‘ displays Tim
LEN (string)
Returns the character length of the specified string. Example:
PRINT LEN(“Timothy”) ‘ prints 7
Seitenansicht 23
1 2 ... 19 20 21 22 23 24 25 26 27 28 29 30

Kommentare zu diesen Handbüchern

Keine Kommentare