57
Example:
A = INSTR(5,B$,“BASIC”)
Remarks:
If <i> is omitted, the search begins with the first character in
<x$>. If the data cannot be found, 0 is returned as the function
value. If <y$> is an empty string, INSTR returns <i> or 1.
LEFT$ Function
Purpose:
To return the specified number of characters beginning from the
leftmost character of the character string
Format:
LEFT$(<x$>,<i>)
<x$> is the string to be searched.
<i> is the number of characters to be returned.
Example:
A$ = LEFT$(B$,5)
Remarks:
<i> must be an integer from 0 to 255. If <i> is 0, an empty string
is returned as the function value. If <i> is greater than the num-
ber of characters in <x$>, the entire character string is returned.
LEN Function
Purpose:
To return the number of characters in a character string
Format:
LEN(<x$>)
Example:
A = LEN(A$)
Remarks:
A value of 0 is returned if the “character expression” is an empty
string.
MID$ Function
Purpose:
To return the requested part of a given string
Format:
MID$(<x$>,<i>[,<j>])
<x$> is the given string.
<i> is the position of the first character to be returned.
<j> is the number of characters to be returned.
Example:B$ = MID$(A$,2,5)
Remarks:
<i> must be from 1 to 255.
<j> must be from 0 to 255.
If <j> is 0, or if the value of the specified character position (<i>) is greater than
the number of characters in the character expression (x$), an empty string is re-
turned.
If <j> is omitted, or if <j> exceeds the number of characters to the right of the
specified position (<i>) in the character expression, all the characters to the right
are returned.
OCT$ Function
Purpose:
To convert the specified decimal number into an octal character
string
Format:
OCT$(<x>)
<x> is a numeric expression in the range of -32768 to 32767.
Example:
A$ = OCT$(B)
Commands, Statements, and Functions
Содержание C500-ASC04
Страница 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Страница 5: ...iv ...
Страница 7: ...vi ...