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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f3f181d88e14bc33,start X-Google-Attributes: gid103376,public From: st-denis carole Subject: HELP... Need QUICK answer on package Date: 1997/06/04 Message-ID: <339638AC.1024@sympatico.ca>#1/1 X-Deja-AN: 246665320 Organization: blabla Newsgroups: comp.lang.ada Date: 1997-06-04T00:00:00+00:00 List-Id: Hello Guys, I am a new ada programer and I am need to produce a package very quickly. My problem is that I don't even know how to do a Package. I am search in many books but I am still stuck at the compiling process. You'll find my small program at the end of this email. Could someone explain me why the compiler is complaining about the first line and ask for the word "body". As I understood a package must be build this way: package MyPack is ... end MyPack; package body Mypack is ... end MyPack; And to use it: with MyPack; procedure CallMyPack is begin MyPackFunction; end; So what's wrong with my program below. Thanks you very much in advance! My program: -- package MyPackage is function MyPackageFunction(a:INTEGER;b:INTEGER) return INTEGER; end MyPackage; package body MyPack is function MyPackFunction(a:INTEGER;b:INTEGER) return Result is Result:INTEGER; begin Result := a+b; return Result; end MyPackFunction; end MyPack; with TEXT_IO; procedure MyProcedure is package MY_INT_IO is new TEXT_IO.INTEGER_IO (INTEGER); use TEXT_IO,MY_INT_IO; use MyPack; somme:INTEGER; begin PUT("La somme est egale a "); somme := MyPackFunction(1,2); PUT(somme); NEW_LINE; end MyProcedure;