delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/30/23:46:47

Message-ID: <3844A3A3.29827E2E@snetch.cpg.com.au>
Date: Wed, 01 Dec 1999 15:27:16 +1100
From: Michael Abbott aka frEk <20014670 AT snetch DOT cpg DOT com DOT au>
Organization: Student of Computer Power Institute
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: sizeof() but nothing to do with sizeof( some_structure )
References: <38447026 DOT 1C29B562 AT id-base DOT com> <003e01bf3ba4$acd9e660$0100a8c0 AT pcpablo>
Reply-To: djgpp AT delorie DOT com

Heya

Yep, sizeof() is a built in operator...

AFAIK, it's converted straight into a typeless token, ie if it's printf ("%i",
sizeof(int)); it will be parsed to printf("%i", 4); and then that number will
be converted to the appropriate type (in this case integer)...

- Michael

Pablo M. Dotro wrote:

> AFAIK, sizeof() is an operator, not a function, so it is not in any header
> files....
> Common sense would tell it returns an int... but I am not sure... This
> should be in the docs somewhere, or, if not, may be is in K&R....
>
> Best regards,
>
> Pablo M. Dotro
> pyd AT sion DOT com                pdotro AT USSEnterprise DOT com
> pdotro AT labs DOT df DOT uba DOT ar     ICQ#: 18144918
> http://www.usuarios.sion.com/abismo
>
> ----- BEGIN GEEK CODE BLOCK -----
> Version 3.12
> GCS/S/IT/CM d- s: a23 c++$ UL P+ E W++ N++ o K- w
> O? M V? PS PE- Y+ PGP>+ t++ 5+ X+ R+>+++ tv b++ DI? D++
> G++ e h! r- y+
> -----END GEEK CODE BLOCK -----
> (para decodificar el bloque, visite www.geekcode.com)
>
> ----- Original Message -----
> From: <sephiroth AT id-base DOT com>
> Newsgroups: comp.os.msdos.djgpp
> To: <djgpp AT delorie DOT com>
> Sent: Tuesday, November 30, 1999 9:47 PM
> Subject: sizeof() but nothing to do with sizeof( some_structure )
>
> > Just wondering if sizeof() is actually defined in the header files( if
> > it is, which one? ) or is it a function built into the compiler? I have
> > looked through loads of header files, and have found no trace of it.
> > Also, what data type does it return? Thanx in advance for any help.
> >
> > --
> > shinyblue             Current listening:
> > ---Blue Fish - One ---------------------
> > ---Paul Van Dyk - Another way/Avenue ---
> > - http://members.dencity.com/blahblur  -
> >
> >



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019