RosettaCodeData/Task/Binary-digits/NetRexx/binary-digits.netrexx

19 lines
418 B
Plaintext

/* NetRexx */
options replace format comments java crossref symbols nobinary
runSample(arg)
return
method getBinaryDigits(nr) public static
bd = nr.d2x.x2b.strip('L', 0)
if bd.length = 0 then bd = 0
return bd
method runSample(arg) public static
parse arg list
if list = '' then list = '0 5 50 9000'
loop n_ = 1 to list.words
w_ = list.word(n_)
say w_.right(20)':' getBinaryDigits(w_)
end n_