From: Mark H Johnson <mark_h_johnson@raytheon.com>
Subject: Re: Ada compiler differences
Date: Mon, 18 Oct 2004 16:48:38 -0500
Date: 2004-10-18T16:48:38-05:00 [thread overview]
Message-ID: <WSWcd.8$V_2.4@dfw-service2.ext.ray.com> (raw)
In-Reply-To: <dac02c02.0410180447.1a4ed08b@posting.google.com>
Magnus wrote:
> Hello,
>
> Could someone please point me to a list of things that may be
> implementation dependent in different ADA compilers and/or on
> different platforms?
>
I would start with chapter 13 of the Ada Reference Manual. Simple things
like Integer'Size (e.g., 32) might not equal Natural'Size (e.g., 31) can
trip you up in a variety of different ways. I also had problems with
some code assuming 'Size of the object was the same as 'Size of the
corresponding type.
I would also suggest a review of the Annotated ARM as well. The
annotations are quite enlightening when trying to determine the possible
implementation details of the language.
> I know that things like 'access and structures without repspec may
> differ. But what else?
>
See above.
> Or rather: how can I write code that really is platform (and compiler)
> independent in Ada?
>
To do that fully would require an extensive list of issues and is often
constrained by the types of platforms you expect to run on. For a simple
example, network order (for TCP/IP) is "big endian". If you are on a
little endian machine, several values need to go through htonl, htons,
and similar functions to be converted. If you "know" you will always on
a big endian machine (same as network order), you might get away without
them, but that isn't portable.
That particular issue has nothing to do with Ada; you have the same
problem with C or other languages.
--Mark
next prev parent reply other threads:[~2004-10-18 21:48 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-18 12:47 Ada compiler differences Magnus
2004-10-18 14:01 ` Jacob Sparre Andersen
2004-10-18 18:31 ` Luke A. Guest
2004-10-18 19:55 ` Nick Roberts
2004-10-19 20:52 ` Luke A. Guest
2004-10-20 1:16 ` Jeffrey Carter
2004-10-18 21:03 ` Martin Dowie
2004-10-19 2:11 ` Jeffrey Carter
2004-10-18 20:36 ` Nick Roberts
2004-10-18 21:48 ` Mark H Johnson [this message]
2004-10-19 14:49 ` Larry Kilgallen
2004-10-19 20:32 ` Mark H Johnson
2004-10-20 16:48 ` Warren W. Gay VE3WWG
2004-10-21 13:54 ` Larry Kilgallen
2004-10-21 20:57 ` Warren W. Gay VE3WWG
2004-10-21 21:05 ` Mark H Johnson
2004-10-26 15:23 ` Larry Kilgallen
2004-10-26 21:21 ` Mark H Johnson
2004-10-27 4:39 ` Larry Kilgallen
2004-10-27 13:49 ` Mark H Johnson
2004-10-20 8:02 ` Rod Chapman
2004-10-21 13:55 ` Larry Kilgallen
2004-10-22 8:13 ` Rod Chapman
-- strict thread matches above, loose matches on Subject: below --
2004-10-20 1:32 Stephen Leake
2004-10-20 5:47 ` Simon Wright
2004-10-26 0:28 ` Randy Brukardt
2004-10-20 13:05 Stephen Leake
2004-10-20 17:17 ` Nick Roberts
2004-10-20 19:44 ` Simon Wright
2004-10-21 21:02 ` Nick Roberts
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox