STR$ converts an INTEGER, SINGLE, or DOUBLE number to a string.
Syntax:RetStr = STR$(Number [, NoSpace AS INTEGER]) Return Value:
Parameters: |
👉 By default, a space is prepended to the returned string if Number is positive and the optional NoSpace parameter is empty or 0. This space is the location for the sign part of the number. When the Number argument is a negative number, a minus sign will be there.
DIM RetStr$ RetStr$ = STR$(3.14159265358979) PRINT DQ$ & RetStr$ & DQ$ RetStr$ = STR$(-3.14159265358979) PRINT DQ$ & RetStr$ & DQ$ RetStr$ = STR$(3.14159265358979, 1) PRINT DQ$ & RetStr$ & DQ$
" 3.14159265358979" "-3.14159265358979" "3.14159265358979"
STRL$ converts an LDOUBLE number to a string.
Syntax:RetStr = STRL$(Number [, NoSpace AS INTEGER]) Return Value:
Parameters:
|
👉 By default, a space is prepended to the returned string if Number is positive and the optional NoSpace parameter is empty or 0. This space is the location for the sign part of the number. When the Number argument is a negative number, a minus sign will be there.
DIM RetStr$ RetStr$ = STRL$(3.141592653589793239L) PRINT DQ$ & RetStr$ & DQ$ RetStr$ = STRL$(-3.141592653589793239L) PRINT DQ$ & RetStr$ & DQ$ RetStr$ = STRL$(3.141592653589793239L, 1) PRINT DQ$ & RetStr$ & DQ$
" 3.141592653589793239" "-3.141592653589793239" "3.141592653589793239"