Hi Brett,

On Thursday, September 12, 2002, 2:05:39 PM, you wrote:

BH>         if not parse block [
BH>             any [set value number! (kount: kount + 1)] |
BH>             set value any! to end
BH>         ] [throw make error! "F2 can only process numbers."]

The  second  part  of the rule will never be reached. ANY does not
fail if it matches 0 elements.

In your trivial example, your code could look like:

   if not parse block [any number!] [ ...

provided you are accepting empty blocks as input too. Of course, I
imagine  your example was actually cut down form something bigger,
that needed the SET VALUE ... and the count (which you could maybe
do faster by just using LENGTH?...).

Regards,
   Gabriele.
-- 
Gabriele Santilli <[EMAIL PROTECTED]>  --  REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to