comp.lang.ada
 help / color / mirror / Atom feed
* Help: Main program parameters
@ 1993-03-25 23:24 Norman Russell
  0 siblings, 0 replies; only message in thread
From: Norman Russell @ 1993-03-25 23:24 UTC (permalink / 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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1993-03-25 23:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-03-25 23:24 Help: Main program parameters Norman Russell

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