From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2adc22b0e703907e X-Google-Attributes: gid103376,public From: "David C. Hoos, Sr." Subject: Re: Representation question (void *) Date: 1999/11/16 Message-ID: <80t8er$23g$1@birch.prod.itd.earthlink.net>#1/1 X-Deja-AN: 549582093 Content-Transfer-Encoding: 7bit References: <7E47A2C771ADD211AD3C00A0C960172D01269B57@ISCPORTSEX> X-Posted-Path-Was: not-for-mail Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-ELN-Date: 17 Nov 1999 03:46:35 GMT X-ELN-Insert-Date: Tue Nov 16 21:07:23 1999 Organization: Ada95 Press, Inc. Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-11-16T00:00:00+00:00 List-Id: Lipscomb, Kevin 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.