This helps to create a neat and tidy lay out when writing data to a file or in simple printing. The source code does not look as messy, either!
NB There is no check to make sure the fixed length is actually long enough, it is assumed the user knows the range of the input.
Code: Select all
;2021-01-24 new
;macro to deliver integer right-justified in fixed length string
;i is the integer and n the fixed length
Macro UStrX(i, n)
Right(Space(n) + Str(i), n)
EndMacro
;2021-01-27 new
;macro to deliver string left justified in fixed length string
;st is the string and n the fixed length
Macro UStrLS(st,n)
Left(st + Space(n), n)
EndMacro
;2021-01-27 new
;macro to deliver string right-justified in fixed length string
;st is the string and n the fixed length
Macro UStrS(st, n)
Right(Space(n) + st, n)
EndMacro