develooper Front page | perl.perl5.porters | Postings from January 2001

Re: One more patch for UTF8

Thread Previous | Thread Next
From:
Tony Cook
Date:
January 9, 2001 15:20
Subject:
Re: One more patch for UTF8
Message ID:
Pine.LNX.4.10.10101101040410.19054-100000@develop-help.com
On Tue, 9 Jan 2001, Nick Ing-Simmons wrote:

> FWIW 
> 
> char foo[10] = { 0 };
> 
> "means" set foo[0] to 0 and leaves foo[1..9] unspecified.

You're wrong.  If you have initializers for an aggregate type, but not for
all elements of the aggregate, then those elements you didn't explicitly
initialize are initialized implicitly as if they were static (ie. to
zero).

See Initializers in C99 (I don't have my C90 standard on-hand, though it
applied there too. I'm 99% sure it's true for K&R C too.)

Tony Cook


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About