Retro Rocket OS
BASIC-Powered Operating System
Loading...
Searching...
No Matches
RADIX$ Function
RADIX$(integer-expression, integer-expression)

Converts an integer value (first parameter) into a string representation using the radix (base) specified by the second parameter. The radix must be between 2 and 36.


Examples

PRINT RADIX$(255, 16)

Produces "FF".

PRINT RADIX$(10, 2)

Produces "1010".

PRINT RADIX$(12345, 36)

Produces "9IX".


Notes

  • Valid radix range is 2 (binary) through 36 (digits + A–Z).
  • Returned value is always uppercase.
  • Negative numbers are prefixed with -.
  • Useful for formatting numbers in arbitrary bases beyond standard decimal, hexadecimal, or octal.
  • To parse a string in an arbitrary base back into an integer, use RADIX.

See also: RADIX · HEXVAL · OCTVAL · VAL