comp.lang.ada
 help / color / mirror / Atom feed
From: russell@mdavcr.mda.ca (Norman Russell)
Subject: Help: Main program parameters
Date: 25 Mar 93 23:24:27 GMT
Date: 1993-03-25T23:24:27+00:00	[thread overview]
Message-ID: <4110@mdavcr.mda.ca> (raw)

Hi there,

Is it possible to have a main ada procedure (program) with parameters?

For example, my main program is called: Read_Text  and I would like
to call that main program (from the command line) with the name of
the file I want to read.

I thought I would be able to have my main procedure has follows:

procedure READ_TEXT (File_Name : in STRING := "") is
begin
  .
  .
  .
end READ_TEXT;

This compiles nicely, but when I go to link it I get the following
error message:

%ACS-E-CL_MAIUNISIG, Main unit READ_TEXT has parameters or a result type that
        are not supported for a main program

Does any body know how I can make this so I can just type from the
command line:

   $ READ_TEXT My_Text_File.TXT

and it will understand I want to read the file called "My_Text_File.TXT"

In case it helps I'm using the VAX ADA Compiler.

Thanks in advance!



        Norm


--
Norman Russell                     | Voice: (604)231-3161
MacDonald Dettwiler and Associates | Fax:   (604)278-6427
CAATS Development Facility         |
13800 Commerce Parkway             |
Richmond, B.C.   CANADA            | Internet: russell@mda.ca
V6V 2J3                            | UUCP: ...!uunet!van-bc!mdavcr!russell




                 reply	other threads:[~1993-03-25 23:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox