comp.lang.ada
 help / color / mirror / Atom feed
From: Mats Weber <Mats.Weber@elca-matrix.ch>
Subject: Re: win32ada design question/problem
Date: 1998/11/19
Date: 1998-11-19T00:00:00+00:00	[thread overview]
Message-ID: <36547645.736EF28F@elca-matrix.ch> (raw)
In-Reply-To: 365455D5.9A1D0B23@Botton.com

David Botton wrote:

> Why wouldn't you use:
> 
> function C_Function ( X : C.char_array ) returns C.Int;
> -- int c_function ( char* x);
> 
> pragma Import (C, C_Function);
> 
> From my understanding it will be passed by_referrence, ie. as a char *
> [...]

That is, of course, a good idea (using Ada 95's C interface stuff),
which its guaranteed to be portable. But that is not the approach taken
for the win32ada binding, which tried its own, IMO bad, way.

The problem with Interfaces.C.Char is that it is not the same as
Standard.Character, and Char_Array is not String, so you will have to
convert all the time, despite the fact that Char = Character on 99.99%
of all platforms. A pity IMO.




  reply	other threads:[~1998-11-19  0:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-13  0:00 win32ada design question/problem Mats Weber
1998-11-13  0:00 ` dennison
1998-11-16  0:00   ` Stephen Leake
1998-11-16  0:00     ` Tucker Taft
1998-11-17  0:00     ` dennison
1998-11-17  0:00       ` Mats Weber
1998-11-17  0:00         ` dennison
1998-11-17  0:00           ` Tucker Taft
1998-11-18  0:00             ` Tom Moran
1998-11-18  0:00               ` dennison
1998-11-17  0:00           ` Mats Weber
1998-11-13  0:00 ` Tom Moran
1998-11-16  0:00   ` Mats Weber
1998-11-18  0:00     ` Tom Moran
1998-11-18  0:00       ` dennison
1998-11-19  0:00       ` Mats Weber
1998-11-19  0:00       ` Mats Weber
1998-11-19  0:00         ` dennison
1998-11-19  0:00           ` David Botton
1998-11-19  0:00         ` David Botton
1998-11-19  0:00           ` Mats Weber [this message]
1998-11-23  0:00             ` Marin David Condic
1998-11-27  0:00     ` Roga Danar
  -- strict thread matches above, loose matches on Subject: below --
1998-11-19  0:00 tmoran
1998-11-19  0:00 ` dennison
1998-11-19  0:00   ` Tom Moran
1998-11-20  0:00     ` dennison
1998-11-20  0:00       ` Tom Moran
1998-11-23  0:00     ` Marin David Condic
1998-11-23  0:00       ` Mats Weber
1998-11-24  0:00         ` dennison
replies disabled

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