comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: HELP:Declaration in ADA?!!
Date: 1996/03/25
Date: 1996-03-25T00:00:00+00:00	[thread overview]
Message-ID: <dewar.827787109@schonberg> (raw)
In-Reply-To: 4j65rr$fqg@soleil.uvsq.fr

Tuyet asks

"DOES SOMEONE KNOW HOW TO DECLARE LONG_INTEGER IN ADA?
All the books I've read here does not answer this metaphysical question, they
just take it as if everyone should know how to declare it. In a wonderful
book, I've seen how to declare LONG_REAL by typing:
   type LONG_REAL is DIGIT 14;
But how to do it for LONG_INTEGER?"

I cannot believe there is ANY Ada book that does not answer this simple 
question, just say

  type x is range m .. n;

where m and n are the bounds you want. If the compiler supports it, that
will do it, and if not, you are out of luck. FOr instane, in GNAT, support
for at least 64 bits is guaranteed, so

  type x is range -2**63 .. 2**63-1;

will always work (actually in GNAT the type Long_Long_Integer, which is
predefined, will always be at least 64 bits).





  reply	other threads:[~1996-03-25  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-03-25  0:00 HELP:Declaration in ADA?!! Tuyet-Tram DANG-NGOC
1996-03-25  0:00 ` Robert Dewar [this message]
1996-03-25  0:00 ` Laurent Guerby
1996-03-28  0:00 ` Ken Devlin
1996-04-08  0:00 ` Ken Devlin
1996-04-09  0:00   ` Walter B. Hollman Sr.
1996-04-09  0:00   ` Martin C. Martin
1996-04-09  0:00     ` Keith Thompson
1996-04-18  0:00     ` Daryl Siddon
1996-04-22  0:00       ` John English
1996-04-24  0:00         ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1996-03-25  0:00 tmoran
1996-03-28  0:00 Scott B. Crawford 0131-314-8253
replies disabled

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