Write language name in 3D ASCII: Difference between revisions

m
→‎simpler, shorter: widened the letter E, changed comments in the REXX section header.
(→‎simpler, shorter: added/changed whitespace and comments, accepts any char for the letter, simplified some expressions.)
m (→‎simpler, shorter: widened the letter E, changed comments in the REXX section header.)
Line 2,247:
===simpler, shorter===
This is a version of the above REXX program (with a minor bug fixed),
<br>the input text has additional spacing between the &nbsp; ''letters'' &nbsp; for better readability,
<br>the letter &nbsp; '''E''' &nbsp; (in the input text) was widened,
<br>the output doesn't have extraneous leading blanks,
<br>the output doesn't have trailing blanks,
<br>the input text can be any consistent character except the forward slash &nbsp; (<big>'''/'''</big>) &nbsp; or backward slash &nbsp;(<big>'''\'''</big>).
<lang rexx>/*REXX pgm draws a "3D" image of text representation (any char except / & \).*/
#=7; @.1 = '@@@@ '
@.2 = '@ @ '
@.3 = '@ @ @@@@ @ @ @ @ '
@.4 = '@@@@ @ @ @ @ @ '
@.5 = '@ @ @@@ @ @ '
@.6 = '@ @ @ @ @ @ @ '
@.7 = '@ @ @@@@ @ @ @ @ '
do j=1 for #; x=left(strip(@.j),1) /* [↓] display the (above) text lines.*/
$.1 = changestr( " " , @.j, ' ' ) ; $.2 = $.1
Line 2,268 ⟶ 2,269:
end /*k*/ /* [↓] display a line and its shadow.*/
end /*j*/ /*stick a fork in it, we're all done. */</lang>
{{out}}'''output''' &nbsp; when using the default input:
<pre>
////////////\
Line 2,274 ⟶ 2,275:
///\ ///\
\\\/ \\\/
///\ ///\ ////////////\ ///\ ///\ ///\ ///\
\\\/ \\\/ \\\\\\\\\\\\/ \\\/ \\\/ \\\/ \\\/
////////////\ ///\ ///\ ///\ ///\ ///\
\\\\\\\\\\\\/ \\\/ \\\/ \\\/ \\\/ \\\/
///\ ///\ /////////\ ///\ ///\
\\\/ \\\/ \\\\\\\\\/ \\\/ \\\/
///\ ///\ ///\ ///\ ///\ ///\ ///\
\\\/ \\\/ \\\/ \\\/ \\\/ \\\/ \\\/
///\ ///\ ////////////\ ///\ ///\ ///\ ///\
\\\/ \\\/ \\\\\\\\\\\\/ \\\/ \\\/ \\\/ \\\/
</pre>