Petr:
Yes it worked. Sorry for the typo. Thanks for your help.
Joe
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 03, 2000 11:40 AM
To: [EMAIL PROTECTED]
Subject: [REBOL] while statement problem Re:(3)
[EMAIL PROTECTED] wrote:
> Petr:
>
> Thanks. Your solution led me to conclude that you can't do this:
>
> prime : true
^^^
prime: true ; note the colon ... a typo on your side?
while [prime and (1 = 1)][prin "."]
............................................................................
..................................................
............................................................................
..................................................
...................................... etc.
works, or not?
Cheers,
-pekr-
>
>
> while [ prime and ... ] [ .. ]
>
> Seems rebol does not interpret 'prime as true in this case. The workaround
> is to state:
> while [ (prime = true) and (...) ] [ .. ]
>
> You have to explicitly state the conditions in the while clause. Strange
..
>
> Joe
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 03, 2000 10:20 AM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] while statement problem Re:
>
> [EMAIL PROTECTED] wrote:
>
> > Anyone,
> >
> > Just learning REbol and need some explanation as to how to do this:
> >
> > while [ prime and test <= square-root number ] [..]
>
> look at 'all and 'any functions ....
>
> while [ all [(prime <= square-root number) (test <= square-root number)]
> ....
> parens () nod needed ...
>
> not sure if it's what you wanted to achieve ...
>
> btw: and should work imho too, just use parens ...
>
> while [(prime <= square-root number) and (test <= square-root number)]
....
>
> Cheers,
> -pekr-
>
> >
> >
> > Rebol complains that i can't use an and . Can multiple conditions be
> placed
> > in the while clause ??? If so, how do you do it?
> >
> > Thanks in advance!
> >
> > Joe