Re: [NTG-context] METAPOST vardef returning multiple and non-numeric types as a single answer?

2020-03-16 Thread Gerben Wierda
Maybe a nice little explanation (educational with good examples) of ‘how to use pass by reference’ and ‘building and using complex data structures’ would be useful for people. Say, some ‘patterns’. G > On 16 Mar 2020, at 10:38, Hans Hagen wrote: > > that said, after muy share of mp

Re: [NTG-context] METAPOST vardef returning multiple and non-numeric types as a single answer?

2020-03-16 Thread Gerben Wierda
> On 16 Mar 2020, at 10:23, Taco Hoekwater wrote: > > > >> On 16 Mar 2020, at 10:10, Taco Hoekwater wrote: >> >> >> >>> On 16 Mar 2020, at 09:53, Gerben Wierda wrote: >>> >>> Hola! So, the arguments passed to macros are by reference and not by value? >>> I could have known of course,

Re: [NTG-context] METAPOST vardef returning multiple and non-numeric types as a single answer?

2020-03-16 Thread Hans Hagen
On 3/16/2020 10:23 AM, Taco Hoekwater wrote: On 16 Mar 2020, at 10:10, Taco Hoekwater wrote: On 16 Mar 2020, at 09:53, Gerben Wierda wrote: Hola! So, the arguments passed to macros are by reference and not by value? I could have known of course, they are simple expansions, but I’d

Re: [NTG-context] METAPOST vardef returning multiple and non-numeric types as a single answer?

2020-03-16 Thread Taco Hoekwater
> On 16 Mar 2020, at 10:10, Taco Hoekwater wrote: > > > >> On 16 Mar 2020, at 09:53, Gerben Wierda wrote: >> >> Hola! So, the arguments passed to macros are by reference and not by value? >> I could have known of course, they are simple expansions, but I’d like to be >> sure. IfI assign

Re: [NTG-context] METAPOST vardef returning multiple and non-numeric types as a single answer?

2020-03-16 Thread Taco Hoekwater
> On 16 Mar 2020, at 09:53, Gerben Wierda wrote: > > Hola! So, the arguments passed to macros are by reference and not by value? I > could have known of course, they are simple expansions, but I’d like to be > sure. IfI assign to a variable inside a vardef macro and that variable is not >

Re: [NTG-context] METAPOST vardef returning multiple and non-numeric types as a single answer?

2020-03-16 Thread Gerben Wierda
Hola! So, the arguments passed to macros are by reference and not by value? I could have known of course, they are simple expansions, but I’d like to be sure. IfI assign to a variable inside a vardef macro and that variable is not ’save’d I’m changing the original? G > On 16 Mar 2020, at

Re: [NTG-context] METAPOST vardef returning multiple and non-numeric types as a single answer?

2020-03-16 Thread Taco Hoekwater
> On 15 Mar 2020, at 11:22, Gerben Wierda wrote: > > I would like a vardef macro to return the pair of a picture and a bounding > box. I don't want to use the setbound operator, because as soon as I do that, > I cannot access the components of the picture anymore with pathpart. > > I found