comp.lang.ada
 help / color / mirror / Atom feed
From: steved@pacifier.com@199.2.117.163  (Steve Doiel)
Subject: Re: Prevalence of Compilers for Which Integer'Size < 32?
Date: 1996/07/27
Date: 1996-07-27T00:00:00+00:00	[thread overview]
Message-ID: <4tdp24$5h1@news.pacifier.com> (raw)
In-Reply-To: dmarshalDv4vLI.D6E@netcom.com


Dave Marshall writes:
>So here I am, looking at some old code while I wonder what I was
>thinking when I wrote it.  Suddenly, I see something that will raise
>Constraint_Error if a compiler's Integer'Size is less than 32.
>
Sorry for not answering your question but...

In my experience I have found that if portablilty is a concern, then all
predefined types should be avoided.

Ada is one of the languages that lends itself the best to defining your own
types in a portable manner:

  type
    anInt32 is range -21474_83648 .. 21474_83647;

If you want to use a "vanilla" integer.

In many cases it is better to define a range that better describes your problem.

BTW: I've used the same type of definitions in 'C' ie:

typedef integer int32;

Steve Doiel





  reply	other threads:[~1996-07-27  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-26  0:00 Prevalence of Compilers for Which Integer'Size < 32? Dave Marshall
1996-07-27  0:00 ` steved [this message]
1996-07-28  0:00   ` Robert A Duff
1996-07-30  0:00     ` Ken Garlington
1996-07-30  0:00       ` Robert Dewar
1996-08-01  0:00         ` steved
     [not found]         ` <31FF5CF0.5C13@lmtas.lmco.com>
1996-08-03  0:00           ` Robert Dewar
1996-08-07  0:00             ` Ken Garlington
1996-07-28  0:00   ` Dave Marshall
1996-07-28  0:00     ` steved
1996-07-28  0:00     ` Robert A Duff
1996-07-28  0:00       ` Robert Dewar
1996-07-29  0:00         ` Robert A Duff
1996-07-28  0:00     ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1996-07-28  0:00 tmoran
1996-07-29  0:00 ` John Herro
replies disabled

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