STR$
(Function)

Converts a value to a character string.

STR$ (<Expression>)

This statement converts the value designated in <Expression> to a character string.

If a value is converted to a character string, there is always a blank to display a sign at the head of the return value. If the value is positive, a blank is inserted at the head of the return value of the Str function. This blank denotes the plus sign. The Str function recognizes only a period (.) as a valid decimal point symbol.

DIM li1 As Integer
|
|
DEFSTR ls1, ls2
|
|
ls1 = STR$(20)
|
'Converts 20 to a character string and assigns it to ls1.
|
ls2 = STR$(li1)
|
'Converts li1 to a character string and assigns it to ls2.
|