[Info-vax] puzzled by DCL symbol substitution
Phillip Helbig---undress to reply
helbig at astro.multiCLOTHESvax.de
Sat Jan 7 12:46:43 EST 2012
In article
<09f5e110-6aa3-44f0-a0bc-d40559d2f302 at z1g2000vbx.googlegroups.com>, AEF
<spamsink2001 at yahoo.com> writes:
> > > The second line is "magic", too. Quotation marks normally have to be
> > > doubled inside a quoted string, but this is the exception. The
> > > quotation marks around PROCEDURE and NAME must *not* be doubled. For
> > > some reason it's different when lexical functions are used in this
> > > manner.
> >
> > Right. This is another case, though, and is documented.
>
> Please tell me where. I don't recall ever seeing anything in the
> manuals telling you that you must not double up quotation marks inside
> a lexical function being substituted within a quoted string. There is
> an example somewhere in the manuals that has an example DCL procedure,
> one of whose lines just happens to do this, but nowhere do the manuals
> tell you to not double up the quotation marks in this case.
Right. I was sure I had seen an example in the manuals, and of course
there are examples in the DCL procedures supplied with VMS. It should
be mentioned in the manual as well, of course.
Are there examples of ''&SYMBOL' anywhere in the DCL procedures supplied
with VMS? A quick search found something superficially similar:
SYS$COMMON:[SYSMGR]DECW$STARTAPPS.COM;1
$ define/system/exec/nolog 'P2' "''F$EDIT(&P1,"UPCASE")'"
Interestingly, it doesn't work if one uses this as a one-line procedure,
but removing the "&" makes it work. Discuss.
> Back to VMS: Does it say anywhere that COPY NL: filename creates a new
> file? And there are some other tricks I can look up as examples.
Why would it NOT create a new file?
I once read about a contest to create the smallest self-reproducing
program. Someone submitted an empty file. They subsequently amended
the rules to disallow this.
More information about the Info-vax
mailing list