Retro Rocket OS
BASIC-Powered Operating System
Loading...
Searching...
No Matches
STR$ Function
string-value = STR$(numeric-value)

Converts a numeric value (integer or real) into its string representation.


Examples

PRINT STR$(123)

Produces "123".

PRINT STR$(-45.67)

Produces "-45.67".

REM Concatenate number into a message
score = 9001
PRINT "Score = " + STR$(score)

Produces "Score = 9001".


Notes

  • Accepts both integers and real numbers.
  • Result is a string in plain decimal notation (no prefixes).
  • Formatting (e.g. fixed decimal places) is not provided; use string operations if specific formatting is required.

See also: VAL · REALVAL · HEXVAL · OCTVAL