Re: Function type

From: Emmanuel Delahaye (emdelYOURBRA_at_noos.fr)
Date: 07/11/04


Date: 11 Jul 2004 17:20:30 GMT

In 'comp.lang.c', "Profetas" <xuxu_18@yahoo.com> wrote:

> I have the following printf
> printf("%s ",get_var_type(type));
>
> How do I make the get_var_type(type) return a char *type ?
> or do I have to return the address?
> Let me clarify.

If you mean 'type' in the meaning of the type of an object, you have it
wrong. 'type' is not a value. It can't be passed as a parameter to a
function.

All you can have from a type is its size in bytes with the unary
operator 'sizeof'. In that case, the type must be in the typecast form :

   size_t n = sizeof (double);

Another possibility is that I completely misunderstood your post.

-- 
-ed- get my email here: http://marreduspam.com/ad672570
The C-language FAQ: http://www.eskimo.com/~scs/C-faq/top.html
C-reference: http://www.dinkumware.com/manuals/reader.aspx?lib=c99
FAQ de f.c.l.c : http://www.isty-info.uvsq.fr/~rumeau/fclc/


Relevant Pages

  • Re: Phils Subversion (Formerly "With" or "by")
    ... himself that would clarify his opinion nor his behavior - except to ... display an evident resentment of anyone who knows other than he does, ... than general terms, and actually gain meaning by being less precise, by ... I read this type of attitude, "Taliban" most often comes to my part Anglo ...
    (alt.usage.english)
  • RE: Macro trouble
    ... Can you clarify the meaning of "only partially worked"? ... Have you checked for broken references in the VBA projects ...
    (microsoft.public.word.vba.general)
  • Re: Masonry and Christianity.
    ... Or clarify your meaning, perhaps? ... I believe our Brother means that the fairer gender tends to respond first ...
    (soc.org.freemasonry)
  • Re: =?ISO-8859-1?Q?G=F6del=27s_theorems_in_Wikipedia?=
    ... (which is intended to clarify the second part of the definition) ... section "Misconceptions about Gödel's Theorem." ... Meaning of Gödel's Theorem", which is a mess, especially in contrast with your sections on the incompleteness theorem and the nice new section on Gentzen's Theorem. ...
    (sci.logic)
  • Re: 2003 L200 Saturn Automatic - Is bottom right display light in dash for ATF?
    ... that the meaning of doesn't just jump out at me. ... I forgot to specify the light I wanted to clarify: the one in the lower right ...
    (rec.autos.makers.saturn)