Str$: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 3: | Line 3: | ||
Str$(X) | Str$(X) | ||
The '''Str$''' [[internal function]] returns the numeric value X | The '''Str$''' [[internal function]] returns the string form of a numeric value X. | ||
====Comments and Examples==== | ====Comments and Examples==== | ||
00010 LET A = 12.34 | 00010 LET A = 12.34 | ||
00020 LET B = 56.0 | 00020 LET B = 56.0 | ||
Line 17: | Line 18: | ||
Lines 50 to 80 will print the following four lines: | Lines 50 to 80 will print the following four lines: | ||
12.34 | 12.34 | ||
56 | 56 | ||
12.3456 | 12.3456 | ||
68.34 | 68.34 | ||
====Related Functions==== | ====Related Functions==== | ||
[[CNVRT$]] converts numbers to strings and provides more formatting options. The inverse function of STR$(X) is [[VAL]](A$). PRINT VAL(STR$(12)) will print the numeric value 12. | [[CNVRT$]] converts numbers to strings and provides more formatting options. The inverse function of STR$(X) is [[VAL]](A$). PRINT VAL(STR$(12)) will print the numeric value 12. | ||
Revision as of 12:13, 30 January 2012
Str$(X)
The Str$ internal function returns the string form of a numeric value X.
Comments and Examples
00010 LET A = 12.34 00020 LET B = 56.0 00030 LET A$ = STR$(A) 00040 LET B$ = STR$(B) 00050 PRINT A$ 00060 PRINT B$ 00070 PRINT A$ & B$ 00080 PRINT STR$(A+B)
Lines 50 to 80 will print the following four lines:
12.34 56 12.3456 68.34
Related Functions
CNVRT$ converts numbers to strings and provides more formatting options. The inverse function of STR$(X) is VAL(A$). PRINT VAL(STR$(12)) will print the numeric value 12.