dac@prolix.pub.uu.oz.au (Andrew Clayton) (04/19/91)
(The line eater doesn't exi Further to my other question, here's a quick and dirty routine I wrote to stop me having to search for a damned Ascii chart whenever I was trying to work out which bloody character I was looking at with the previous program. I thought it might be useful. Perhaps as an example of how not to code in Arexx? :-/ ----------------------------------cut here----------------------------------- /*rexx*/ /*Ascii - write an ascii chart*/ do loop = 0 to 15 line.loop = "" end start = 0 ending = 127 breakoff = 32 call calcascii start = 128 ending = 255 breakoff = 160 call calcascii say " Dac's Ascii Chart" say " 0 10 20 30 40 50 60 70 80 90 A0 B0 C0 D0 E0 F0" say " 0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240" say " -------------------------------------------------------------------" buf = " |" do loop = 0 to 15 gloop = loop // 16 if loop = 10 then buf = "|" /*Bleych!*/ say d2x(gloop) gloop buf line.loop"|"d2x(gloop) gloop end exit Calcascii: do loop = start to ending if loop < breakoff then chars = " . " else chars = " "||d2c(loop)||" " gloop = (loop // 16) line.gloop = line.gloop || chars end return ------------------------------cut here-------------------------------------- Dac --