[REBOL] Antwort: Re: Antwort: Re: (No subject)Date: Wed, 22 Nov 2000 00:30:29 +1
From: sharriff::aina::med-iq::de at: 21-Nov-2000 15:56
Thanks Chris!
Sharriff Aina
Chris
<[chris--starforge--de] An: [rebol-list--rebol--com]
mon.co.uk> Kopie:
Gesendet von: Thema: [REBOL] Re: Antwort: Re: (No subject)Date: Wed, 22
Nov 2000
[cpage--starforge--dem] 00:30:29 +1100
on.co.uk
21.11.00 15:36
Bitte antworten an
rebol-list
[Sharriff--Aina--med-iq--de] wrote:
> ..err Brett, it took me so long to decide whether to ask, since I
thought
> it would be too embarrasing. But alas! no matter how hard I squint at
this
> snippet, the less I understand. I tried it out in the console, it works,
> but the value that makes the "print" switch baffles me... either checks
to
> see if " row-colour " is eqaul to " 'blue
> " right? but row-clour has already been passed the reference to 'blue
so
> it should always be true?????!!
Go through it in the loop by hand:
start with row-colour: 'blue
print blue
row-colour equals 'blue so set row-colour to 'black
print black
row-colour is not equal to 'blue so set row-colour to 'blue
and so on...
Haven't seen one like that outside C or assembler though :) A lot of
people
prefer to do a modulo 2 on the loop counter and use a different colour
depending n whether the result is 0 or 1 (I failed a job test once
because
I used this sort of flip rather than a modulo, seems some people
consider
it a bit "dirty"..))
Chris
--
New sig in the works
Explorer2260 Designer and Coder
http://www.starforge.co.uk