RosettaCodeData/Task/Formatted-numeric-output/NetRexx/formatted-numeric-output.netrexx

17 lines
447 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
/* NetRexx */
options replace format comments java crossref savelog symbols binary
import java.text.MessageFormat
sevenPointOneTwoFive = double 7.125
-- using NetRexx Built-In Functions (BIFs)
say Rexx(sevenPointOneTwoFive).format(5, 3).changestr(' ', '0')
-- using Java library constructs
System.out.printf('%09.3f\n', [Double(sevenPointOneTwoFive)])
say MessageFormat.format('{0,number,#00000.###}', [Double(sevenPointOneTwoFive)])
return