comp.lang.ada
 help / color / mirror / Atom feed
From: "Zane H. Healy" <healyzh@shell1.aracnet.com>
Subject: DEC Ada and packages
Date: 7 Feb 2002 04:44:19 GMT
Date: 2002-02-07T04:44:19+00:00	[thread overview]
Message-ID: <a3t0n302v6e@enews3.newsguy.com> (raw)

I'm trying to teach myself Ada using DEC Ada on OpenVMS.  I've currently run
into a bit of a problem.  How on earth do you deal with Packages?  I've been
reading through the DEC Ada manuals and can't find anything.

As I understand it I should be able to put have a file 'powers.ada' have
something like the following in it (taken from an excellent tutorial I found
online):

package body Powers is
        function Square (Arg: Integer) return Integer is
        begin
                return Arg * Arg;
        end Square;

        function Cube (Arg: Integer) return Integer is
        begin
                return Arg * Square(Arg);
        end Cube;
end Powers;

Then call it from another file with a Proceedure.

However, I end up with the following results:

$ acs
ACS> load powers
%ACS-I-CL_COMPILING, Invoking the Compaq Ada compiler
ACS> compile powers
1 obsolete unit

%ACS-I-CL_COMPILING, Invoking the Compaq Ada compiler

    4   package body Powers is
........1
%ADAC-E-CL_SPENOTFOU, (1) Specification for Powers not found in library
at line number 4 in file MONK$DKB500:[HEALYZH.WORK]POWERS.ADA;4
%ADAC-E-ERRRECOMPILE, Errors recompiling package body Powers in file 
        MONK$DKB500:[HEALYZH.WORK]POWERS.ADA;4
%ADAC-E-ENDDIAGS, Ada compilation completed with 1 diagnostic

1 unit compiled in 00:00:00.14

%ACS-E-CL_ERRDURCOM, Errors during compilations
ACS> load play
%ACS-I-CL_COMPILING, Invoking the Compaq Ada compiler
ACS> compile play
%ACS-E-CL_UNKREFUNI, PLAY depends on unit POWERS, which is not in the
library
ACS> 

So how on earth do I get POWERS into the Library?  I'm sure I'm missing
something obvious, but what?

			Zane



             reply	other threads:[~2002-02-07  4:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-07  4:44 Zane H. Healy [this message]
2002-02-07 13:44 ` DEC Ada and packages Charlie McCutcheon
2002-02-07 18:34   ` Zane H. Healy
2002-02-07 20:52     ` Marin David Condic
2002-02-07 21:29   ` Jeffrey Carter
2002-02-15 13:25     ` Charlie McCutcheon
2002-02-15 13:28       ` Ed Falis
2002-02-15 17:33       ` Jeffrey Carter
2002-02-16  1:45     ` Robert Dewar
2002-02-16  2:08       ` Jeffrey Carter
  -- strict thread matches above, loose matches on Subject: below --
2002-02-07  5:59 Gautier Write-only-address
2002-02-07 18:19 ` Zane H. Healy
replies disabled

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