In order to "pad" a number I'm printing so that it's always a fixed number of characters, I'm making a padding string based off how many integers and in the given number:
pad := ' '.
(freqVal < 10) ifTrue: [ pad := ' ' ].
((freqVal < 100) & (freqVal > 9)) ifTrue: [ pad := ' ' ].
((freqVal < 1000) & (freqVal > 99)) ifTrue: [ pad := ' ' ].
stdout<<pad<<freqVal<<<<nl
However, the printed result always makes the variable pad
into a letter instead of spaces like I'm assigning its value to. If I add pad displayNl
before the last line it prints out a letter for some reason instead of just spaces.
Any ideas why this might be occurring?