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=2.5 required=5.0 tests=BAYES_00,PDS_OTHER_BAD_TLD, TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b9718fc889b868b7,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-06 21:06:10 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!pln-e!spln!dex!extra.newsguy.com!newsp.newsguy.com!not-for-mail From: "Zane H. Healy" Newsgroups: comp.lang.ada Subject: DEC Ada and packages Date: 7 Feb 2002 04:44:19 GMT Organization: Aracnet Message-ID: NNTP-Posting-Host: p-199.newsdawg.com User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (Linux/2.2.19 (i686)) Xref: archiver1.google.com comp.lang.ada:19688 Date: 2002-02-07T04:44:19+00:00 List-Id: 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