[mod.computers.vax] Parsing command line exactly as typed

SYSMGR%UK.AC.KCL.PH.IPG@AC.UK (12/01/86)

> Is there a way in VMS 4.4 to retrieve the command line exactly as the
> user typed it, without having DCL chomp on it.
> Among the many features of LIB$GET_FOREIGN(),
> DCL converts case, ignores text after !, and invokes its own quoting mechanism
> I simply wish to obtain exactly what the user typed.
> I am willing to work in almost any language to get this done.
> Is this possible ?

I always thought DCL was a rats nest and now I know it is. The following was
determined experimentally on VMS 4.3 and, as far as I know, is not documented
anywhere so it may well break later. However...

The obvious is to set up the foreign command (to invoke TEST:TEST) as
TEST :== $TEST:TEST "

The idea being that everything following the double quote, until CR, will
be unprocessed by DCL. You then just ignore the first character returned
by LIB$GET_FOREIGN. It doesn't work!

However,

TEST :== $TEST:TEST """

 seems to work fine. You can then handle text like $TEST This is OK!! isn't it?
although double quotes probably foul up.

Nigel Arnot (Dept. Physics, Kings college, Univ. of London;  U.K)

Bitnet/NetNorth/Earn:   sysmgr@ipg.ph.kcl.ac.uk (or) sysmgr%kcl.ph.vaxa@ac.uk
       Arpa         :   sysmgr%ipg.ph.kcl.ac.uk@ucl-cs.arpa

garry@TCGOULD.TN.CORNELL.EDU (Garry Wiegand) (12/02/86)

In a recent article Nigel Arnot said:
>I always thought DCL was a rats nest and now I know it is. The following was
>determined experimentally on VMS 4.3 and, as far as I know, is not documented
>anywhere so it may well break later. However...
>
>The obvious is to set up the foreign command (to invoke TEST:TEST) as
>TEST :== $TEST:TEST "
>....

Nigel, you're confusing everybody. The ':=' assignment operator is *obsolete*
and *shouldn't be used anymore*. (The regular '=' assignment along with
the F$EDIT lexical can do everything the ':=' used to do -- only much
more clearly.)

The above should have been written:  

	TEST == "$TEST:TEST """

Note the doubled quote marks just before the end of the quoted string.

And, in reply to the original poster, there is no way to do precisely
what he wants. What is needed is a $Raw_Line option for Cli$Get_Value...
hello, Dec?

garry wiegand   (garry%cadif-oak@cu-arpa.cs.cornell.edu)

art@mitre.ARPA (Art McClinton) (12/03/86)

The :== string assignment is not listed in the VMS DCL Distionary as
obsolete.  It performs a different set of operations than the character
oriented == string assignment.  I do not know where you received the idea
that :== is obsolete but I do not think that DEC agrees with you.

 
     
*
*---Art
*
*Arthur T. McClinton Jr.     ARPA: ART@MITRE.ARPA
*Mitre Corporation MS-Z305   Phone: 703-883-6356
*1820 Dolley Madison Blvd    Internal Mitre: ART@MWVMS or M10319@MWVM
*McLean, Va. 22102           DECUS DCS: MCCLINTON
*

wilkinsn@SPCA.BBN.COM (Ronald Wilkinson) (12/03/86)

In the transition from VMS version 2 to VMS version 3, I believe, most of the
character string symbol assignment examples in the "Guide to Using DCL and
Command Procedures" manual were switched from using := to =.  That gave me and
apparently others the strong suspicion that := was being phased out.  Other
changes that occurred in the documentation at that time really were done as
part of a phase out, such as the switch from SYS$SYSDISK to SYS$SYSDEVICE and
SYS$SYSROOT.  I still wonder if DEC was considering phasing out := and decided
not to because := was already very widespread and for certain purposes more
convenient, or whether DEC always intended the two operators to co-exist.

Ronald Wilkinson
BBN Software Products Corp.
10 Fawcett Street
Cambridge, MA 02230

ARPA: wilkinsn@spca.bbn.com  (note no "o" in login name)
phone: (617) 497-8105