comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: pointer in C & in  Ada
Date: Wed, 08 Aug 2001 18:03:09 GMT
Date: 2001-08-08T18:03:09+00:00	[thread overview]
Message-ID: <x9fc7.42118$Kd7.25933580@news1.rdc1.sfba.home.com> (raw)
In-Reply-To: 3B710715.4C213A70@amsjv.com

>This essentially permits the compiler to avoid issuing a warning about a
>type mismatch in using functions where the programmer has decided the
>type doesn't matter.
  Sometimes it's useful to replace a single C function that uses void*
with two different Ada functions, with two different variable types,
both of which call the same C function (or even both of which are
simply "pragma import"s of the same C function).  In C you can say
"this parameter is this type, or it's any type", while in Ada you
could make specific different functions (overloading the same name)
to allow exactly the desired set of parameter types.



  parent reply	other threads:[~2001-08-08 18:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-07 22:39 pointer in C & in Ada Lin
2001-08-07 23:05 ` Didier Utheza
2001-08-08  9:29   ` Florian Weimer
2001-08-08 14:52     ` Ted Dennison
2001-08-08 16:52       ` Florian Weimer
2001-08-09 16:54     ` Didier Utheza
2001-08-13 15:47       ` lange92
2001-08-07 23:31 ` tmoran
2001-08-08  3:14 ` DuckE
2001-08-08  9:32 ` Des Walker
2001-08-08 10:40   ` Florian Weimer
2001-08-08 18:03   ` tmoran [this message]
2001-08-08 14:59 ` Ted Dennison
2001-08-08 16:53   ` Florian Weimer
2001-08-08 18:03   ` tmoran
2001-08-08 23:29   ` Des Walker
2001-08-09 20:21     ` Florian Weimer
replies disabled

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