Metrologic IS1000 Series Betriebsanweisung Seite 39

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 198
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 38
Chapter
5
BASIC
Commands
33
If there is no difference between the corresponding characters of two strings and they are
the same length, then the two strings are equal. If there is no difference between the
corresponding characters of two strings, but one of the strings is longer, the longer string is
greater than the shorter string. For example, "abc" = "abc" and "aaaaaaaa" > "aaaaa" are
both true expressions.
Leading and trailing blank spaces are significant in comparing strings. For example, the
string " abc" is less than the string "abc" since a blank space is less than an "a"; on the other
hand, the string "abc " is greater than the string "abc".
5.4.3 Getting the Length of a String
LEN
Purpose
To return the length of a string.
Syntax
A% = LEN(X$)
Remarks
"A%" is an integer variable to be assigned to the result.
"X$" may be a string variable, string expression, or string constant.
Note that non-printing characters and blanks are counted.
Example
String1$ = "abcde "
A% = LEN(String1$)
'A% = 6, including the blank
5.4.4 Searching for Strings
Searching for a string inside another one is one of the most common string-processing tasks.
INSTR is provided for this task.
INSTR
Purpose
To search if one string exists inside another one.
Syntax
A% = INSTR([N%,] X$, Y$)
Remarks
"A%" is an integer variable to be assigned to the result.
"N%" is a numeric expression in the range of 1 to 255. Optional offset N sets the
position for starting the search.
Seitenansicht 38
1 2 ... 34 35 36 37 38 39 40 41 42 43 44 ... 197 198

Kommentare zu diesen Handbüchern

Keine Kommentare