That's an interesting idea if I understand
it correctly.
Ben is suggesting that instead of
passing `0', which contains what the user
typed after the command line, from calling program
to called program, programmers should
pass `macval(0)'. In other words,
what was specified on the command
line is protected against interpretation.
This recommendation not only would oblige
Stata programmers to change a lot of code,
just in case the macro contains
a literal $, but would also seem
to presuppose that only at some
lowest level would the macval() be
ignored, i.e. there is some innermost
code which checks what was typed for syntax.
In the case of graphing code, at least,
that presupposition appears to be generally
wrong. The contents of `0' have to be
unpacke; they are not passed from
program to program like a baton
in a relay race.
Conversely, if only the innermost program
is allowed to peek at `0', it will have,
I guess, have to do all the work, as the
the others are just transporters.
Nick
[email protected]
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Jann, Ben
> Sent: 22 May 2004 21:53
> To: [email protected]
> Subject: st: RE: RE: treatment of "$" in graphics text
>
>
> Nick wrote:
>
> > So, in order to get past the guard dogs,
> > Agent Ryan, you need a sausage for every dog. Whether there
> > is a clever way of nesting \$ I don't know, but I
> > doubt it, and in any case that would be an impractical
> > strategy, as you would have to know _exactly_ how many sausages
> > were needed, or more prosaically how many times your code would
> > get interpreted: with the new graphics' deeply nested
> > structure, not just of ados but also of class-based
> > stuff, goodness knows what the answer is.
>
> This is not really a problem of the nesting. That is, from a
> user's perspective it should not be. I think, that the nesting
> structure of the underlying commands should be irrelevant for
> the users and that the graph commands schould be fixed!
> (i.e. the strings should only be interpreted once and passed
> through using macval() thereafter. I don't see why this would
> not be possible.)
>
> ben
>
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/