[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A One Liner
- Subject: Re: A One Liner
- From: Sheldon Simms <sheldonsimms@yahoo.com>
- Date: Fri, 13 Feb 2004 11:39:14 -0500
- Newsgroups: comp.sys.apple2
- Organization: Posted via Supernews, http://www.supernews.com
- References: <pan.2004.02.13.07.03.04.232675@yahoo.com> <mt4Xb.54586$Wa.18753@news-server.bigpond.net.au>
- User-agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
- Xref: archiver1.google.com comp.sys.apple2:3412
On Fri, 13 Feb 2004 13:40:34 +0000, Peter Watson wrote:
> "Sheldon Simms" <sheldonsimms@yahoo.com> wrote in message
> pan.2004.02.13.07.03.04.232675@yahoo.com">news:pan.2004.02.13.07.03.04.232675@yahoo.com...
>>
>> Ok, certainly nothing special, but I was looking to waste a bit of
>> time this evening and came up with this:
>>
>> 1GR:HOME:C=0:D=176:A=1616:FORX=4TO35STEP2:COLOR=C:VLIN0,39ATX:
>> VLIN0,39ATX+1:H=INT(C/10):POKEA+X,H+D:POKEA+X+1,C+D-10*H:C=C+1:
>> A=1744-A+1616:NEXT
>>
>> So, who can make the program shorter while keeping the exact same
>> display?
>
> Sorry, I couldn't resist! You made that too easy with "C=0"! :-)
> But I'm sure there's a *real* way to make it shorter!
Thou shalt initialize thy variables before use. :-)
> Actually, am I missing something? Shouldn't "A=1744-A+1616" be changed to
> "A=3360-A"?
You're right. there's no trick, just overlooking the obvious!