comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam@spam.com>
Subject: Re: trying to call HDF5 from ada -- problems with constants
Date: Fri, 27 Aug 2004 00:54:46 GMT
Date: 2004-08-27T00:54:46+00:00	[thread overview]
Message-ID: <qDvXc.14426$3O3.9581@newsread2.news.pas.earthlink.net> (raw)
In-Reply-To: <XrCdnb4o8vUnqrPcRVn-sg@megapath.net>

Randy Brukardt wrote:
> Since this object is going to be a constant in the Ada code, it's
> unfortunate that you can't declare it that way:
> 
>     H5T_STD_I32BE_g : constant Hid_t;
> 
> but that lack of an explicit initializer makes it illegal. (I think an
> implementation could support this if it wanted to - pragma Import can be a
> completion - but I don't know if any do.)

What? I've thought this has always been legal Ada 95. Certainly

package Import_Constant is
    I : constant Integer;
    pragma Import (C, I, "i");
end Import_Constant;

compiles without error (GNAT 3.15p/Win98).

-- 
Jeff Carter
"My legs are gray, my ears are gnarled, my eyes are old and bent."
Monty Python's Life of Brian
81




  reply	other threads:[~2004-08-27  0:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-25 13:38 trying to call HDF5 from ada -- problems with constants Christopher Broeg
2004-08-25 16:35 ` Brian Catlin
2004-08-26  8:04   ` Christopher Broeg
2004-08-26 11:00     ` Jeff C,
2004-08-26 11:46       ` Christopher Broeg
2004-08-26 18:29         ` Ludovic Brenta
2004-08-26 19:20         ` Randy Brukardt
2004-08-27  0:54           ` Jeffrey Carter [this message]
2004-08-27 11:32             ` Christopher Broeg
replies disabled

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