ASCII art diagram converter: Difference between revisions

Content deleted Content added
→‎{{header|REXX}}: added/changed whitespace and comments. aligned some statements, added wording to the REXX section header, simplified code for a PARSE statement.
m →‎{{header|REXX}}: added a better idiomatic method for lowercasing a hexadecimal string.
Line 1,473:
say 'test (hex)=' test " length=" L 'hexadecimal digits.'
say
do r=1 by 8+8 to L*4; _1= substr(bits, r, 8, 0); _2= substr(bits, r+8, 8, 0)
say 'test (bit)=' _1 _2 " hex=" lower( b2x(_1) ) lower( b2x(_2) )
end /*r*/
say
do m=1 for words($) /*show [↓] display hex stringsome inhexadecimal lowercasestrings──►term.*/
_= translatelower( b2x( substr( bits, @.m, !.m) ),) /*show the hex string 'abcdef',in lowercase. "ABCDEF" )*/
say right( word($, m), w+2) ' decimal='right( x2d(_), wm) " hex=" _
end /*m*/
exit 0 end /*m*/ /*stick a fork in it, we're all done. */</lang>
/*──────────────────────────────────────────────────────────────────────────────────────*/
lower: l= 'abcdefghijklmnopqrstuvwxyz'; u=l; upper u; return translate( arg(1), l, u)</lang>
{{out|output|text=&nbsp; when using the default input:}}
<pre>