[Coco] Decypher this code!

Christopher Hawks chawks at dls.net
Sun Oct 5 19:36:18 EDT 2008


Robert Gault said the following on 10/01/2008 09:37 PM:
> J.P. Samson wrote:
>> On Oct 1, 2008, at 6:16 PM, Robert Gault wrote:
>>> It would help to see the DATA statements but without them, my best 
>>> guess would be:
>>>
>>> 95 CLS(0):FORX=1TO26STEP2:T=(X-1)*16:T2=(X-1)*16+16:PRINT at T,P$(X,1);:
>>> PRINT at T2,P$(X,2);:NEXTX:END
>>
>> Why use (X-1)*16+16 when you could use the mathematically equivalent 
>> X*16.  But who knows if the programmer bothered to optimize!
>>
>> -- JP
>>
> 
> Tim asked to translate the scan. There is no way the scan could be X*16, 
> so even though that would be better than my proposed translation, it is 
> not relevant.
> 
> However, the choice for the character between the two 16s is relevant 
> and significant. So what do you think it is?

	I think it IS +

	The article says it prints out 2 columns and on a 32x16 screen the code will 
do exactly that. In fact that's what I thought it would do from looking at the 
code before I read the article. The (x-1)*16 and (x-1)*16+16 makes that very 
obvious.

BTW: has anyone else noticed that Robert Gault's replies are from 3 days ago??


-- 
Christopher R. Hawks
HAWKSoft
---------------------------------------------------------
If you make people think they're thinking, they'll love you;
but if you really make them think, they'll hate you.



More information about the Coco mailing list