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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.236.32.165 with SMTP id o25mr1614090yha.53.1421001467856; Sun, 11 Jan 2015 10:37:47 -0800 (PST) X-Received: by 10.140.102.19 with SMTP id v19mr596326qge.2.1421001467838; Sun, 11 Jan 2015 10:37:47 -0800 (PST) Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!v8no298946qal.1!news-out.google.com!n9ni482qai.0!nntp.google.com!v8no298945qal.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 11 Jan 2015 10:37:47 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=50.138.174.211; posting-account=AvekzAoAAABj-TclKcOWQmXwA49MFPGX NNTP-Posting-Host: 50.138.174.211 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5fc3a42d-f922-4e34-ab30-59613b980fb6@googlegroups.com> Subject: Multiple procedures in the same adb file? From: John Smith Injection-Date: Sun, 11 Jan 2015 18:37:47 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.giganews.com comp.lang.ada:191840 Date: 2015-01-11T10:37:47-08:00 List-Id: Hello, I have a question, what if I want multiple procedures in the same adb file, can that be done? This is my code right now: =============================================================================== procedure a_test(A, B : Integer; C : out Integer) is begin C := A + B; end a_test; procedure test_procedure is output : Integer; begin a_test(23, 34, output); end test_procedure; =============================================================================== And this is the compilation error that I got: =============================================================================== % gnatmake -g test_procedure.adb gcc -c -g test_procedure.adb test_procedure.adb:16:01: end of file expected, file can have only one compilation unit gnatmake: "test_procedure.adb" compilation error =============================================================================== Basically, if I have the program entrance function, how do I add others so as to break up the logic of the program?