Str$

String management function.

The Str$ function converts the specified numeric value to a string.

Syntax

var$=Str$(<number>)

Parameters

<number>, numeric, integer value to be converted to a string.

Return value

var$, string, return value containing the converted value. If <number> is negative, the string var$ contains a leading minus sign.

See also

Val

Examples

 

Var$ = Str$(123 ) ' Returns the string "123"

Var$ = Str$(-123) ' Returns the string "-123"

msgbox(str$(25))

Var$ = Str$(var)

 

i=0

repeat

msgbox("index is now: "+str$(i))

i=i+1

until i=5