From: Cherniavsky Beni Newsgroups: comp.os.msdos.djgpp Subject: Re: calculating size (like sizeof in TurboC++) Date: Tue, 20 Jun 2000 15:49:41 +0200 Organization: Technion Lines: 26 Message-ID: <394F7675.360E66CF@crosswinds.net> References: <642A954DD517D411B20C00508BCF23B0012B16CF AT mail DOT sauder DOT com> <394CDAD3 DOT 2B075EC3 AT crosswinds DOT net> <394cfdf2 DOT 35169241 AT news DOT freeserve DOT net> NNTP-Posting-Host: 132.68.54.8 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.06 [en] (WinNT; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Steamer wrote: > > Cherniavsky Beni wrote: > > > > > It might be useful to emphasize that sizeof(expression) is not a function that > > can be implemented by any library but an *operator*. It is computed at > > *compile time* as a property of the type of the expression (which is never > > computed). > > This is true in C89/C90. But note that C99 has variable length arrays, > and sizeof applied to such an array is computed at execution time. > Moreover, DJGPP (or rather gcc) already supports this, even though it > is as yet a long way from being C99-compliant. > > S. Thanks for the information, I had no idea about it. Anyway it's a long way from a function that can be written in C which seemed to be misunderstood by Kurt Aistinger. -- Beni Cherniavsky (also scben AT t2 in technion) What's the exterior of a domain? When one takes a bath we shout "Man overboard!".