🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.decus
Article #272

Re: Favorite operating systems query (UNIX vs VMS flaming!!!)

#272
From: iwm
Date: Thu, 10 Jul 1986 20:20
43 lines
2878 bytes
In article <1320@psivax.UUCP> friesen@psivax.UUCP (Stanley Friesen) writes:
>>
>>No. VMS programs will not let you invoke them with bogus arguments. Since
>>the arguments are parsed by DCL before the program is invoked, if you give
>>too many parameters or an unknown switch DCL will reject it with an error
>>message that points out the specific problem.
>
>	Oh, *great*:-) How does the DCL parse the arguments for a user
>written application program?? I can't see how it can do this without
>some rather messy interface requirements.  This really sounds like a
>way to make user-written programs second class citizens on the system.
>I think the individual program is better qualified to analyse its own
>arguments, whay is really needed is a *standard* for this, like getopts(3)!

Well I find its a very nice interface: 
 1 Define the syntax in a text form in a command definition file eg:
   DEFINE VERB CRASH
    IMAGE "USER_GAMES:DIE.EXE"
    PARAMETER P1,LABEL=TIME,VALUE(PROMPT="When?,TYPE=$DATETIME)
 2 Write your program and use two interface functions to check if 
   items are pressent and get their values, using the label to refer to them.
 3 Install the command by typing SET COMMAND filename - when and where you do this
   depends on who you want to see the definition.

 I like this because :
  All the prompting, syntax checks etc are done for you, it is possible to list
mutually exclusive options and have that checked too. Data type checks
can be specified - the example will only allow a valid date/time, and
will even convert CRASH TOMORROW into the real date for me!
The real winner is that it is the SAME parser for all commands. I 
have problems with any system that forces each program to parse its args
(CMS, NOS, UNIX...) - by all means use getopt, but who is going to rewrite
existing programs and manuals?

    -- 
Ian W Moor
  UUCP: seismo!mcvax!ukc!icdoc!iwm
  ARPA: iwm%icdoc@ucl                        
           
 Department of Computing   Whereat a great and far-off voice was heard, saying,
 Imperial College.         Poop-poop-poopy, and it was even so; and the days
 180 Queensgate            of Poopy Panda were long in the land.
 London SW7 Uk.         
Technical Details
Message-ID: <347@ivax.doc.ic.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utcs!mnetor!seismo!mcvax!ukc!icdoc!iwm
References: <486@batcomputer.TN.CORNELL.EDU> <1000@ttrdc.UUCP> <873@rti-sel.UUCP> <1320@psivax.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utcs!mnetor!seismo!mcvax!ukc!icdoc!iwm
From: iwm@icdoc.UUCP
Newsgroups: net.decus,net.unix,net.usenix
Subject: Re: Favorite operating systems query (UNIX vs VMS flaming!!!)
Message-ID: <347@ivax.doc.ic.ac.uk>
Date: Thu, 10-Jul-86 16:20:11 EDT
Article-I.D.: ivax.347
Posted: Thu Jul 10 16:20:11 1986
Date-Received: Sat, 12-Jul-86 06:37:27 EDT
References: <486@batcomputer.TN.CORNELL.EDU> <1000@ttrdc.UUCP> <873@rti-sel.UUCP> <1320@psivax.UUCP>
Reply-To: iwm@doc.ic.ac.uk (Ian Moor)
Organization: Dept. of Computing, Imperial College, London, UK.
Lines: 43