Skip to content
This repository has been archived by the owner on Jan 16, 2021. It is now read-only.

Latest commit

 

History

History
57 lines (48 loc) · 1.65 KB

STR$.org

File metadata and controls

57 lines (48 loc) · 1.65 KB

Top | Up (String) | < Previous (VAL) | Next (FORMAT$) >

STR$

Converts a number to a string.

Syntax

STR$ number [, lengt​h%] OUT string$
ParameterDescription
numberIf this is a float, STR$ will print at most 6 significant figures, using scientific notation if nessesary.
length%If the length of the output is shorter than this, spaces will be added to the beginning of the string

STR$ uses the formatting code %.6g for floats and %d for integers.

Examples

SCORE=1000
PRINT "SCORE: "+STR$(SCORE) 'SCORE: 1000

See Also: