STR$ function

Purpose: STR$ converts a number to a string.


 Syntax:

 RetStr$ = STR$(Number)

 Parameters:

  • Number Integer or floating point literal or variable.

 Return Value:

  • RetStr$, the return value, is a string converted from Number parameter. Note well that a space is prepended to the returned string if the number is positive. This space is the location of the sign part of the number. When RetStr$ is a negative number, a minus sign will be there and when it's a positive number, it'll be blank.

Example:


 DIM RetStr$
 
 RetStr$ = STR$(3.14159)
 
 PRINT RetStr$

BCX Console Sample Programs using STR$ function.

S04.bas, S10.bas, S19.bas, S24.bas, S54.bas, S70.bas, S89.bas, S92.bas, S107.bas