String
fixed_str
Formats a number as text with exactly places decimal places (for example, fixed_str(-0.56789, 2) returns “-0.57”). Guarantees a clean display regardless of floating-point representation, making it ideal for showing noisy values such as joystick axes. Use FIXED for the rounded number form.
fixed_str(value, places)
Parameters
- value - Any numeric expression
- places - Number of decimal places (0-15; negative values are treated as 0)
Example
SCREEN 320, 240
PRINT fixed_str(-0.56789, 2), fixed_str(2, 2)
PRINT "Score: " + fixed_str(1234.5, 1)