comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: Representation question (void *)
Date: 1999/11/16
Date: 1999-11-16T00:00:00+00:00	[thread overview]
Message-ID: <80t8er$23g$1@birch.prod.itd.earthlink.net> (raw)
In-Reply-To: 7E47A2C771ADD211AD3C00A0C960172D01269B57@ISCPORTSEX


Lipscomb, Kevin <KLipscomb@C2CEN.USCG.mil> wrote in message
news:7E47A2C771ADD211AD3C00A0C960172D01269B57@ISCPORTSEX...
> How would one represent the following C declaration in Ada 95?
>
>    void *data;
>
> Is this just a placeholder for a pointer that should never be referenced?
>
No. A variable or function argument of type pointer to void means it can be
a pointer to an object of any type -- maybe the ultimate in type unsafeness.

As the return type of a function void (without the asterisk) means
a function that returns nothing -- the c equivalent of an Ada procedure.

void *some_function_name means that like the variable or function argument
case, the value returned by the function can point to any type of data.








  reply	other threads:[~1999-11-16  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-16  0:00 Representation question (void *) Lipscomb, Kevin
1999-11-16  0:00 ` David C. Hoos, Sr. [this message]
1999-11-17  0:00   ` Ehud Lamm
1999-11-16  0:00 ` Keith Thompson
1999-11-17  0:00   ` tmoran
1999-11-17  0:00 ` Matthew Heaney
1999-11-17  0:00 ` Robert Dewar
replies disabled

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