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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Package procedure as program entry in GPR project Date: Fri, 25 Jan 2019 15:42:12 -0600 Organization: JSA Research & Innovation Message-ID: References: <9c44582e-faff-4498-88e1-c8715471e857@googlegroups.com> Injection-Date: Fri, 25 Jan 2019 21:42:13 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="23929"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader01.eternal-september.org comp.lang.ada:55374 Date: 2019-01-25T15:42:12-06:00 List-Id: "Jesper Quorning" wrote in message news:9c44582e-faff-4498-88e1-c8715471e857@googlegroups.com... > Hello All, > > With the package specifikation: > > package My_Program_Package is > procedure Program_Entry_Procedure; > end My_Program_Package; > > How do i make Program_Entry_Procedure as the program entry procedure in a > GPR project? I realize you are asking for GPR, so by definition you don't care about portability, but: Ada only requires Ada implementations to support library-level procedures as the main. See 10.2(29). A particular implementation can allow more, but there is no requirement. So if you ever might want to use some other Ada compiler (I for one, hope so), use such a routine. It's trivial to write one, after all: with My_Program_Package; procedure My_Program_Main is begin My_Program_Package.Program_Entry_Procedure; end My_Program_Main; Randy.