HP3000-L Archives

August 2002, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"VANCE,JEFF (HP-Cupertino,ex1)" <[log in to unmask]>
Reply To:
VANCE,JEFF (HP-Cupertino,ex1)
Date:
Thu, 15 Aug 2002 15:04:04 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
> > 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 *

ATOM RSS1 RSS2