
VALR
Purpose
To convert a string expression to a real number.
Syntax
A! = VALR(X$)
Remarks
"A!" is a real number variable to be assigned to the result.
"X$" is a string that includes numeric characters. The precision of the converted
result is governed by the "SET_PRECISION" function.
Example
A! = VALR("123.45")
PRINT "A = ", A!
...
REM A = 123.45
5.4.7 Creating Strings of Repeating Characters
STRING$
Purpose
To return a string containing the specified number of the requested character.
Syntax
A$ = STRING$(N%, X$)
A$ = STRING$(N%, J%)
Remarks
"A$" is a string variable to be assigned to the result.
"N%" is a numeric expression in the range of 0 to 255, indicating the number of a
character.
"J%" is a numeric expression in the range of 0 to 255, indicating the ASCII code of
a character.
"X$" may be a string variable or string constant.
Example
IDX_LENGTH% = 20
Data$ = Name$ + STRING$(IDX_LENGTH% - LEN(Name$)," ")
ADD_RECORD$(1,Data$)
' padding with space if the length of Name$ is less than IDX_LENGTH%
Comentários a estes Manuais