Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Antwort: Re: (No subject)Date: Wed, 22 Nov 2000 00:30:29 +1100

From: chris:starforge:demon at: 21-Nov-2000 15:36

[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