X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f996b,9649f8e0fea890bd,start X-Google-Attributes: gidf996b,public From: gspath@epix.net (Greg) Subject: Ascii Hearts Date: 1997/04/24 Message-ID: <5jo3kg$kkn$1@news1.epix.net>#1/1 X-Deja-AN: 237078462 Organization: epix Internet Services Reply-To: gspath@NOSPAM.epix.net (Greg) Newsgroups: alt.ascii-art Got bored today and wrote some code. Here it is, Have fun :) /* ---------------------------------- */ /* take text and melt it into a heart */ /* REXX code 4/24/97 by Gregory Spath */ /* enjoy :) */ /* ---------------------------------- */ /* To use: */ /* HEART [scroll] [text] */ /* */ /* if both scroll and text are */ /* ommitted, a single character heart */ /* is made using the value defined for */ /* an ASCII spacer below */ /* ---------------------------------- */ parse arg scroll thetext l=length(thetext) /* The following line defines the character used as a spacer */ heart = "@" if scroll="" then scroll = heart scrolltest=left(scroll,1,1) if c2d(scrolltest) < 48 | c2d(scrolltest) > 57 then do thetext = scroll||thetext scroll=1 end /* make adjustments to text if necessary */ do while l<200 thetext=thetext||heart||thetext l = length(thetext) end /* seed the output strings */ do i=1 to 20 step = i * scroll output.i=" " overtext.i=substr(thetext, step) end /* make the heart */ data.1='09062606' data.2='07102410' data.3='05142214' data.4='03172117' data.5='0237' data.6='0139' data.7='0139' data.8='0139' data.9='0237' data.10='0335' data.11='0433' data.12='0531' data.13='0727' data.14='0923' data.15='1119' data.16='1315' data.17='1511' data.18='1707' data.19='1903' data.20='2001' do i = 1 to 4 start1=substr(data.i, 1, 2) length1=substr(data.i, 3, 2) start2=substr(data.i, 5, 2) length2=substr(data.i, 7, 2) output.i=overlay(substr(overtext.i, start1), output.i, start1, length1) output.i=overlay(substr(overtext.i, start2), output.i, start2, length2) end do i = 5 to 20 start1=substr(data.i, 1, 2) length1=substr(data.i, 3, 2) output.i=overlay(substr(overtext.i, start1), output.i, start1, length1) end do i = 1 to 20 say output.i end __________________________________________________ reply-to address is incorrect. Please send any email to gspath@epix.net. __________________________________________________ Greg Spath (Wease on IRC) | SKYDIVING gspath@epix.net | MOUNTAINBIKING http://www.epix.net/~gspath | OS/2 and IRC --------------------------------------------------