From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!asuvax!ncar!csn!everest!iplmail!iplmail!sag From: sag@iplmail.orl.mmc.com (Steve Gabrilowitz) Newsgroups: comp.lang.ada Subject: Re: Command line arguments Message-ID: <1991Apr30.135735.1211@iplmail.orl.mmc.com> Date: 30 Apr 91 13:57:35 GMT References: <91113.165139TAINT021@ysub.ysu.edu> <1991Apr25.143711.11311@ecst.csuchico.edu> <3275@enea.se> Sender: sag@iplmail (Steve Gabrilowitz) Organization: Martin Marietta List-Id: In article <3275@enea.se>, sommar@enea.se (Erland Sommarskog) writes: |> |> Since you retrieve the arguments differently in different OSs, |> reading the command line is something which by definition is |> not portable(*) so it can't be in the language. Remember that |> the command-line interface itself is OS dependent. |> |> (*) Yes, I know that argc/argv is commonly available with C |> implementations. But if you're going to get the command-line |> interface right in, say, VMS, you better use the CLI$ routines. Not exactly true. The argc/argv will work fine under VMS without using the CLI$ routines if the program is invoked via a symbol: $ TESTP :== $SYS$USER:[STEVE]TESTP.EXE $ TESTP 1 2 3 Your statement is correct only if the program is installed as a command using a .CLD file and $ SET COMMAND and all that junk. No matter, if Ada had some construct defined as a part of the language which would retrieve the commmand line parameters nothing would prevent the compiler writers from implementing whatever it was on VMS by internally calling the appropriate CLI$ functions - and isn't that part of what Ada is all about, providing a programming environment which is uniform and consistent over different platforms? The only problem I see with putting access to the command line into the Ada language is how it would be handled on embedded real time systems where the OS doesn't provide any mechanism for getting at the command line - indeed, there isn't even a command line to get at ;-) Perhaps this could best be handled by providing a recommended "standard" for getting the command line in Chapter 13? -- Steve Gabrilowitz Martin Marietta, Orlando Fl. sag@iplmail.orl.mmc.com Fidonet 1:363/1701