Re: Apparent newbie question
Hi Steven

> This must be something dumb, but I want to test the length of a block
> and can't seem to do it, yet I can print the length of the block.  What
> am I missing?

Not dumb, but frequent error
 
> Thank you.
> 
> *_*_*_*_* Sample script *_*_*_*_*
> 
> REBOL [ ]
> 
> TEST-BLOCK: [ XXXXXXXX  YYYYYYYYY  100  200 ]
> 
> print ["Length of TEST-BLOCK is " length? TEST-BLOCK]
> 
> if length? TEST-BLOCK < 4 [
>     print "block too short"
> ]

for the interpreter your code is execute like if it was like this :

    if length? (TEST-BLOCK < 4) [ ... ]

So you can write :

    if (length? TEST-BLOCK) < 4 [ ... ]

or

    if 4 > length? TEST-BLOCK [ ... ]



DideC 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to