TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Paul Stachour <[log in to unmask]>
Reply To:
Paul Stachour <[log in to unmask]>
Sat, 11 Aug 2001 23:13:24 -0500
text/plain (30 lines)
prabhath rao wrote:

> Hello,
> I have an assignment, in which i have to port GNAT ada 95 code running on
> Tru64 unix, which runs in 64 bit mode to GNAT ada 95(which outputs 32 bit
> mode executable) on HP platform. I would like to know the complexity
> involved and any reference manual is there which can ease my job
> Best regards
> Prabhath

    If you are talking about well-written *application* code, instead of
calls to OS primatives (which I hope you have well-packaged), then the
effort *should* be quite small.   Unlike java where "everything is 32 bits",
in Ada, one normally declares the *logical* range of the numbers, and lets
the compiler map them to that hardware.  So, if you declared your types
as ranges, then it is 'merely' are recompile.

    To express it another way, in Ada one declares the ranges of the numbers
one wants.  The compiler then immediately says "Yes" and does the comiles,
or "No" and indicates to you that it does not handle numbers of that range.
Since many Ada compilers have a built-in multiple-precision package,
they either compile your code to the native hardware, or to the
package, whichever is the most effective.

   Hope this is helpful.  ..Paul S.