Hi Alex
Thank you for confirming no return and the alternative.
Best Regards
Dean

On 19 January 2017 at 14:44, Alexander Burger <a...@software-lab.de> wrote:

> Hi Dean,
>
> > I'd like to do this but am not sure if it's possible
> >
> > ( case <whatever>
> >    #========= start of match clause
> >    (<some match>
> >        (prog
> >            (if (<some test is T>) (EXIT THIS MATCH CLAUSE/PROG))
> >            (otherwise you'll execute this statement)
> >        )
> >   )
> >   #========= end of match clause
> >   .
> >   .
> >   .
> > I also wonder if there's a similar... (if (T) (EXIT FUNCTION))
>
> If I understand you right, you are looking for an exit out of a nested
> expression, like a 'return' statment in C or Java.
>
> Such a return does not exist, there is catch/throw for that
>
>    (catch 'something
>       (for (..)
>          (if (..)
>             (throw 'something)
>             (elseStuff)
>             ..
>
> Catch/throw is more general then 'return', but the latter can be emulated
> with
> it.
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to