Well, I should add that I use rebol/core version 2.2.0.4.2

  Regards,
  Jan

[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Here's my console session:
> 
> >> test: func [blk][
> [      forall blk [
> [            if not integer? first blk [return "Not integer!"]
> [          ]
> [      none
> [    ]
> >> test ["a" 1]
> == "Not integer!"
> >> test [1 "a" 1]
> == "Not integer!"
> >> test [2 3 1 "a" 1]
> == "Not integer!"
> >>
> >> test [1 2 3 "a" 5 6]
> == "Not integer!"
> >>
> Looks ok to me!
> Russell [EMAIL PROTECTED]
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, February 20, 2000 2:10 PM
> Subject: [REBOL] [BUG] in 'return
> 
> 
> >
> >  Hi.
> >
> > Next one problem:
> >
> > do you ever try return from forall in function?
> >
> > test: func [blk][
> >   forall blk [
> >     if not integer? first blk [return "Not integer!"]
> >   ]
> >   none
> > ]
> >
> > >> test [ 1 2 3 "a" 5 6]
> > == none
> >
> > Dictionary says:
> >
> > Exits the current function immediately, returning a value as the result of
> > the function.
> >
> > So It's a bug IMHO.
> >
> > To exit only 'forall should be used break (with refinement /return to
> return
> > some value)
> >
> > Another $0.02 :-)
> >
> > Regards.
> > Jan
> >
> >
> > --
> > Jan Strejcek
> > [EMAIL PROTECTED]
> >
> >
> 

--
Jan Strejcek
[EMAIL PROTECTED]

Reply via email to