Basic -> ARexx
Joe –
> I guess I didn't indicate that . . .
Great – just wanted to be sure since it is a common oversight on
introduction to ARexx – at least I made it and I'm as common as can be 🙂
> . . . an ARexx function that would convert a binary or decimal number
> to ASCII, . . .
Guess that I'm not understanding what you are looking for, since B2C, X2C,
and D2C seem to do just that, as shown by the following 'inline' ARexx
programs:
> rx "say b2c('00110000 00100000 00110001 00110011')" ; binary->ascii
0 13
> rx "say c2b(01 3)" ; ascii->binary
00110000001100010010000000110011
> rx "say x2c('61 62 20 63')" ; hex->ascii
ab c
> rx "say c2x('ab c')" ; ascii->hex
61622063
> rx "say d2c('4276803')" ; decimal->ascii note: 4276803='414243'X
ABC
> rx "say d2x(c2d('ABC'))" ; ascii->dec->hex
414243
Of course these functions work for the single character case also. d2c(14889)
——