comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Package procedure as program entry in GPR project
Date: Fri, 25 Jan 2019 15:42:12 -0600
Date: 2019-01-25T15:42:12-06:00	[thread overview]
Message-ID: <q2fvrk$nbp$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: 9c44582e-faff-4498-88e1-c8715471e857@googlegroups.com

"Jesper Quorning" <jesper.quorning@gmail.com> 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.


  parent reply	other threads:[~2019-01-25 21:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25 15:12 Package procedure as program entry in GPR project Jesper Quorning
2019-01-25 17:05 ` Jere
2019-01-25 21:42 ` Randy Brukardt [this message]
2019-01-26  1:47   ` Jesper Quorning
2019-01-26 12:05   ` Simon Wright
2019-01-26 12:08     ` Simon Wright
replies disabled

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