[REBOL] Re: Error
From: joel:neely:fedex at: 25-Jun-2001 11:39
Hi, John and Paul,
John Schuhr wrote:
> You should group the logic relationships like so:
>
> if (rtime > (ctime + 5)) [
> ; do something
> ]
>
PMJI, but only the right-hand set of parens is needed, as in
if rtime > (ctime + 5) [...]
The underlying issue is that there is no operator precedence
in REBOL, so that
val0 op0 val1 op1 val2 op2 val3
gets evaluated strictly left-to-right, as if
((val0 op0 val1) op1 val2) op2 val3
Thus, in your example, another option would be
if ctime + 5 < rtime [...]
HTH!
-jn-
It's turtles all the way down!
joel'dot'neely'at'fedex'dot'com