Ciao,
Format$ has not been developed to align data but only format data to a numeric format.
"0" means a fixed place. "#" mean a variable place not substituted by space.
To have alignment, you need to mix Format$ with RSet$
Like in the following Code:
Uses "Console"
long nSpace = 7
PrintL RSet$(Format$(123456, "#0"), nSpace) & " expected 123456"
PrintL RSet$(Format$(12345 , "#0"), nSpace) & " expected ~12345"
PrintL RSet$(Format$(1234 , "#0"), nSpace) & " expected ~~1234"
PrintL RSet$(Format$(123 , "#0"), nSpace) & " expected ~~~123"
PrintL RSet$(Format$(12 , "#0"), nSpace) & " expected ~~~~12"
PrintL RSet$(Format$(1 , "#0"), nSpace) & " expected ~~~~01"
WaitKey
Bookmarks