Subject: | |
From: | |
Reply To: | VANCE,JEFF (HP-Cupertino,ex1) |
Date: | Thu, 15 Aug 2002 15:04:04 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
> > The CI resolves variable names *before* it even knows what the command
> > is. That allows this kind of dynamic structure to work:
> >
> > setvar x "#"
> > !x foo fum fie
> > !x there is more to do... # simple comments here
> >
> > Now if you setvar x to "echo", you get output from the above.
Wirt write:
> Nonetheless, you can easily argue that this construct, if
> left as it is, is a
> design error. Comments should never be handed off to a
> parser/interpreter/compiler.
As I wrote above, the CI does not know the command is a comment
command until it has resolved variables (well, at least until
it resolves the command name token). I use the above construct
fairly effectively as a way to add tracing/debugging info to a
script without lots of IF statements.
But, then, I have a bias as it's my design... ;-)
Jeff V.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|