Substr & Format -- update

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Substr & Format -- update

Mike Cowlishaw-3
I have fixed the problem with substr -- this will be in the next

On investigating the format report, I believe it is working correctly?
In the sequence:

  say '$'cents/hund.format(null,2)

hund.format(null.2) gives 100.00, as expected; 150/100.00 then gives
1.5 (trailing zeros are removed on a divide), and so the final result
is $1.5

To get a result of $1.50, I'd write:

  say '$'(cents/hund).format(null,2)

For the third line.

(Text for the document changed, as suggested -- thanks!)

Mike Cowlishaw
IBM Fellow, IBM UK Laboratories
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>