[Info-vax] puzzled by DCL symbol substitution

AEF spamsink2001 at yahoo.com
Sat Jan 7 16:32:22 EST 2012


On Jan 7, 12:46 pm, hel... at astro.multiCLOTHESvax.de (Phillip Helbig---
undress to reply) wrote:
> In article
> <09f5e110-6aa3-44f0-a0bc-d40559d2f... at z1g2000vbx.googlegroups.com>, AEF
>
> <spamsink2... 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?

I'm not aware of any.

> 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.

I'll try it later.

>
> > 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?

Where does it say in the user manuals that there even is a creature
such as NL:? The only place I've seen it is was in the DCL Dictionary
for the SPAWN command and it wasn't explained what NL: was. All it
said was "This problem may be avoided by specifying /INPUT=NL:." So if
you don't know NL: is the null device, how would you even guess to try
it?

>
> 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.

Huh? I'm missing something here. Please explain.

AEF




More information about the Info-vax mailing list