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

iwm at icdoc.UUCP iwm at icdoc.UUCP
Fri Jul 11 06:20:11 AEST 1986


In article <1320 at psivax.UUCP> friesen at 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 at 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.         



More information about the Comp.org.usenix mailing list