[Openmcl-devel] tagbody and go

Taoufik Dachraoui dachraoui.taoufik at gmail.com
Wed Dec 8 08:52:30 PST 2010


It is not exactly what I am looking for, I would like to jump directly to
the step.
The ecase will check all the clauses in order (like cond) until it finds a
match.

Kind regards
Taoufik

On Wed, Dec 8, 2010 at 5:37 PM, Pascal Costanza <pc at p-cos.net> wrote:

>
> On 8 Dec 2010, at 17:36, Taoufik Dachraoui wrote:
>
> > Hi
> >
> > I would like to implement something like the following:
> >
> > (defun runstep (step)
> >    (tagbody (go step)
> >        1 (format t "run 1~%") (go end)
> >        2 (format t "run 2~%") (go end)
> >        3 (format t "run 3~%") (go end)
> >        4 (format t "run 4~%") (go end)
> >        5 (format t "run 5~%") (go end)
> >      end ))
> >
> > this does not work, but how can I do something like this?
>
> (defun runstep (step)
>  (ecase step
>     (1 ...)
>     (2 ...)
>     (3 ...)))
>
>
> Pascal
>
> --
> Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
> Vrije Universiteit Brussel
> Software Languages Lab
> Pleinlaan 2, B-1050 Brussel, Belgium
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20101208/65cde7c7/attachment.htm>


More information about the Openmcl-devel mailing list