Re: sizeof foo vs sizeof (foo) (Was Re: [PHP-DEV] PHP audit)

From: Date: Thu, 14 Mar 2002 13:35:33 +0000
Subject: Re: sizeof foo vs sizeof (foo) (Was Re: [PHP-DEV] PHP audit)
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-81213@lists.php.net to get a copy of this message
We know :) And yet, we always use sizeof(), regardless of whether we feed it with a type or a value. Zeev At 15:34 14/03/2002, Jedi/Sector One wrote:
On Thu, Mar 14, 2002 at 01:19:32PM +0000, Wez Furlong wrote: I know of a compiler for the Amiga that doesn't grok 'sizeof struct foo'; the solution is to always use 'sizeof(struct foo)'. sizeof <type> is incorrect. The correct sizeof semantics are sizeof <value> or: sizeof( <type> ) So sizeof (<value>) means to evaluate '(<value>)' whoose result is '<value>', then compute 'sizeof <value>' . --
 __  /*-      Frank DENIS (Jedi/Sector One) <j@42-Networks.Com>     -*\  __
 \ '/    <a href="http://www.PureFTPd.Org/"> Secure FTP Server </a>    \' /
\/ <a href="http://www.Jedi.Claranet.Fr/"> Misc. free software </a> \/


« previous php.dev (#81213) next »