* Ada version cheat sheet (2012 vs. 2005 vs. '95 ...) ?
@ 2018-12-10 22:58 julian.fondren
2018-12-11 0:12 ` Jere
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: julian.fondren @ 2018-12-10 22:58 UTC (permalink / raw)
Howdy,
For my personal development environments, Ada 2012 is totally fine, and
I know that some features I especially like require it ('with' pre/post
conditions, for some/all expressions), but it's come up that it might
benefit a project to be compileable by older compilers. For example,
CentOS 6 only offers an Ada 2005 package.
Is there a cheat sheet of the form, "in place of this Ada 2012
construct, you can use this Ada 2005 equivalent (or workaround)"?
Ada 2012:
function getrusage (Who : Integer; Report : access RUsage) return Integer
with Import => True, Convention => C, External_Name => "getrusage";
Ada 2005:
function getrusage (Who : Integer; Report : access RUsage) return Integer;
pragma Import (C, getrusage, "getrusage");
Or is my best bet to use an older compiler (or flag like -gnat05, where
available), and then look in older versions of the ARM for what fails?
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Ada version cheat sheet (2012 vs. 2005 vs. '95 ...) ?
2018-12-10 22:58 Ada version cheat sheet (2012 vs. 2005 vs. '95 ...) ? julian.fondren
@ 2018-12-11 0:12 ` Jere
2018-12-11 22:16 ` Randy Brukardt
2018-12-12 20:41 ` mgr
2 siblings, 0 replies; 4+ messages in thread
From: Jere @ 2018-12-11 0:12 UTC (permalink / raw)
On Monday, December 10, 2018 at 5:58:41 PM UTC-5, julian....@gmail.com wrote:
> Howdy,
>
> For my personal development environments, Ada 2012 is totally fine, and
> I know that some features I especially like require it ('with' pre/post
> conditions, for some/all expressions), but it's come up that it might
> benefit a project to be compileable by older compilers. For example,
> CentOS 6 only offers an Ada 2005 package.
>
> Is there a cheat sheet of the form, "in place of this Ada 2012
> construct, you can use this Ada 2005 equivalent (or workaround)"?
>
> Ada 2012:
>
> function getrusage (Who : Integer; Report : access RUsage) return Integer
> with Import => True, Convention => C, External_Name => "getrusage";
>
> Ada 2005:
>
> function getrusage (Who : Integer; Report : access RUsage) return Integer;
> pragma Import (C, getrusage, "getrusage");
>
> Or is my best bet to use an older compiler (or flag like -gnat05, where
> available), and then look in older versions of the ARM for what fails?
>
> Thanks.
Here is the one that comes to mind. Haven't combed through it to verify
everything:
https://www.ada2012.org/comparison.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Ada version cheat sheet (2012 vs. 2005 vs. '95 ...) ?
2018-12-10 22:58 Ada version cheat sheet (2012 vs. 2005 vs. '95 ...) ? julian.fondren
2018-12-11 0:12 ` Jere
@ 2018-12-11 22:16 ` Randy Brukardt
2018-12-12 20:41 ` mgr
2 siblings, 0 replies; 4+ messages in thread
From: Randy Brukardt @ 2018-12-11 22:16 UTC (permalink / raw)
...
> Is there a cheat sheet of the form, "in place of this Ada 2012
> construct, you can use this Ada 2005 equivalent (or workaround)"?
Closest thing I know of is this comparison chart:
http://www.adaic.org/advantages/ada-comp-chart/
but it's probably too coarse for your use.
Randy.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Ada version cheat sheet (2012 vs. 2005 vs. '95 ...) ?
2018-12-10 22:58 Ada version cheat sheet (2012 vs. 2005 vs. '95 ...) ? julian.fondren
2018-12-11 0:12 ` Jere
2018-12-11 22:16 ` Randy Brukardt
@ 2018-12-12 20:41 ` mgr
2 siblings, 0 replies; 4+ messages in thread
From: mgr @ 2018-12-12 20:41 UTC (permalink / raw)
El 10/12/18 a las 23:58, julian.fondren@gmail.com escribió:
> Is there a cheat sheet of the form, "in place of this Ada 2012
> construct, you can use this Ada 2005 equivalent (or workaround)"?
>
Not exactly what you asked for, but these might provide some help:
https://en.wikibooks.org/wiki/Ada_Programming/Ada_83
https://en.wikibooks.org/wiki/Ada_Programming/Ada_95
https://en.wikibooks.org/wiki/Ada_Programming/Ada_2005
https://en.wikibooks.org/wiki/Ada_Programming/Ada_2012
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-12 20:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 22:58 Ada version cheat sheet (2012 vs. 2005 vs. '95 ...) ? julian.fondren
2018-12-11 0:12 ` Jere
2018-12-11 22:16 ` Randy Brukardt
2018-12-12 20:41 ` mgr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox