
RPBASIC-52 PROGRAMMING GUIDE
2-103
STR
Syntax: A = STR(function,$(n)[,$(n)]))
Where: function = 0 to 14, specifies string function to perform as described below.
Function: Performs string m anipulation, described below, pe r function number.
Mode: Command,Run
Use: A = STR(0,$(0))
Cards: RPC-320, RPC-330
DESCRIPTION
There are 11 string manipulation functions using STR. Each function is described below.
NOTE: Most of these functions require a string variable (such as $(0)) rather than a quoted string. Functions
which will allow quoted strings offer an alternate syntax immediately below the first one.
Syntax: A = STR(0,$(n))
Description:
Returns num ber of characters in a string. When string is not set equal to som ething, or the string num ber is
out of bounds, erroneous data is returned. Length limit is 254 characters.
Example:
10 STRING 100,20
20 $(0)=" 123456789"
30 PRINT STR(0,$(0))
run
10
Syntax: A = STR(1,$(n))
Description:
Convert letters A - Z to lower case. Variable A returns length of the string.
Example: 10 STRING 100,20
20 $(0)="Some UPPER case"
30 A = STR(1,$(0))
40 PRINT $(0)
run
some upper case
Syntax: A = STR(2,$(n))
Description:
Convert letters a - z to upper case. Variable A returns length of the string.
Example: 10 STRING 100,20
20 $(1) = "Some lower case."
30 A = STR(2,$(1))
40 PRINT $(1)
run
SOME LOWER CASE.
Komentáře k této Příručce