35 lines
716 B
Text
35 lines
716 B
Text
/* NetRexx */
|
|
|
|
options replace format comments java crossref savelog symbols
|
|
|
|
import java.text.MessageFormat
|
|
import java.text.FieldPosition
|
|
|
|
useBif()
|
|
useMessageFormat()
|
|
|
|
return
|
|
|
|
method useBif public static
|
|
|
|
st = "Mary had a %1$ lamb."
|
|
si = 'little'
|
|
|
|
say st.changestr('%1$', si)
|
|
|
|
return
|
|
|
|
method useMessageFormat public static
|
|
|
|
result = StringBuffer('')
|
|
|
|
args = Object [ -
|
|
Object Integer(7), -
|
|
Object Date(), -
|
|
Object 'a disturbance in the Force' -
|
|
]
|
|
msgfmt = MessageFormat('At {1, time} on {1, date}, there was {2} on planet {0, number, integer}.')
|
|
result = msgfmt.format(args, result, FieldPosition(0))
|
|
say result
|
|
|
|
return
|