Anonymous user
Cantor set: Difference between revisions
m
→{{header|REXX}}: added whitespace, changed some comments.
MaiconSoft (talk | contribs) No edit summary |
m (→{{header|REXX}}: added whitespace, changed some comments.) |
||
Line 2,197:
<lang rexx>/*REXX program displays an ASCII diagram of a Canter Set as a set of (character) lines. */
w= linesize() /*obtain the width of the display term.*/
if w==0 then w=
do lines=0;
if _>w then leave /*Too large? We passed the max value. */
#=_ /*this value of a width─of─line is OK. */
Line 2,205:
$= copies('■', #) /*populate the display line with blocks*/
do j=0 until #==0 /*show Cantor set as a line of chars. */
if j>0 then do k=#+1 by #+# to w /*skip 1st line blanking
$= overlay( left('', #), $, k)
end /*j*/
say $ /*display a line of the Cantor Set. */
|