[EMAIL PROTECTED] wrote:
> In this context, what is the definition of a
> "condition" and why does
> REBOL treat the two conditions differently? Why not
> use a block for an
> "if" statement as we do for loops?
Because WHILE needs to evaluate the condition several times, so it
needs the code of the condition, not the result of its execution;
IF, on the other hand, just needs the result. If you really want
an IF which uses a block, then use the following:
my-if: func [
"My strange if" [throw "To make RETURN work as expected"]
cond-block [block!] "Condition block"
code-block [block!] "Code block"
] [
if do cond-block code-block
]
Ciao,
/Gabriele./
o--------------------) .-^-. (----------------------------------o
| Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
| GIESSE on IRC \ \-\_/-/ / http://www.amyresource.it/AGI/ |
o--------------------) `-v-' (----------------------------------o