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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd3300f3a56e7f45 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-17 09:13:13 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: different compilers: different standard types????? Date: Wed, 17 Mar 2004 18:10:20 +0100 Organization: AdaCL Message-ID: <1289218.QGP5jpaqpk@linux1.krischik.com> References: Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1079543511 00 25374 Vu7jGUxrp2TaAfR 040317 17:11:51 X-Complaints-To: usenet-abuse@t-online.de X-ID: GnAtJ8ZD8eJ4lYfgcImyszmLD8p3AFFk3xU1XBqDC99fp72IRHVgc4 User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:6376 Date: 2004-03-17T18:10:20+01:00 List-Id: Riccardo wrote: > Hello everybody! > > I've got a problem. > Using an old program that now my Firm wants to make running on different > kind of consoles simoultaneously I see that my compilers (I have two of > them) are different ones depending on the fact that the word lenght is > different (32 vs 64 bit). > > Specifically: I noticed that the type long_long_integer, that is used on > the first one, is not present at all on the second one. Well define your own types. > I'm looking for a solution that should permit me to compile the software > on both the environments making, obviously, the least changes on the > current version. > > The same product, in the end, should be compiled on both the consoles > without making changes! (it is possible!?!??!!??!) If both compilers support the same types: yes. > Is there someone who has any kind of easy solution for that problem?? I take it you are pretty new to Ada - otherwise you would know the solution. In Ada you can define your own integer types. i.E.: type Month is range 1 .. 31; The compiler will choose the bits needed which is good for most programms. If you need a special size you can say: for Month'Size use 8; -- bit! or even for Month'Size use 5; Performace for a 5 bit type will be abysmal but if you want it the compiler will give it to you. If you need long_long_integer and the compiler does not provide one use: type long_long_integer is range -2**63 .. +2**63 - 1; for long_long_integer'Size use 64; With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com