On 17 Oct 2002 16:03:26 +0200
Emil Hedevang Lohse <[EMAIL PROTECTED]> wrote:

> Jens-Uwe Morawski <[EMAIL PROTECTED]> writes:
> 
> > Ahoi MP experts,
> > 
> > i've tried to implement a keyval-interface in MP.
> > 
> > Currently it looks like
> > 
> > def keyvalFunc (text t) =
> >     begingroup;
> >     save status, col ;
> >     numeric status; string col ;
> >             t ;
> >     show status;
> >     show col ;
> >     endgroup;
> > enddef;
> > 
> > keyvalFunc(status=1.0; col="Hallo" ) ;
> > 
> > This works, of course, but i would prefer if i could
> > use a comma instead of the ";" to separate the keyval-pairs.
> > 
> > Any ideas, how i can make "," be locally like ";"?
> 
> Perhaps 
> 
> begingroup
> let ,=;;
> endgroup
> 
> will do the job.

Thanks. I've already tried this. The problem was that it changes
the meaning globally, since MP groups do nothing until one 'save's
variables inside the group. But surprisingly (for me) this works:

 begingroup
 save , ;
 let ,=; ;
 endgroup

Jens
_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://ref.ntg.nl/mailman/listinfo/ntg-context

Reply via email to