Page 1 of 1

display lines with numbers same length

Posted: 17 Jul 2019 12:03
by augustinharrison
i have an interpreter that uses display. any procedure can write its results using the call to display.
often these result lines have some text then an amount it shows.

display "one example of amt = ", AmoutVariable
display "another example of amt = ", AnotherAmountVariable
on the result page that would show:
one example of amt = 100.00
another example of amt = 200.00

is there a way to make each line the same length and right justify the amount?
possibly using = and or : as the character to split the text from the value, padding to a common length?

Re: display lines with numbers same length

Posted: 17 Jul 2019 13:15
by Harrison Pratt
See format in the string class.