©
serviceprofessionalgmbh
Conversion of binary values into decimal.
Haus
/* REXX * B2D
*/
arg bin test . täglich
if test = "T" then trace "?r"
dez = 0
if datatype(bin,"B") then do
do p=length(bin) to 1 by -1
dez = dez + substr(bin,p,1) * 2 ** (length(bin)-p)
end
end
return dez
back to Help in Daily Life