Python Front-end to GCC

Steven D'Aprano steve+comp.lang.python at pearwood.info
Tue Oct 22 13:23:35 EDT 2013


On Tue, 22 Oct 2013 16:53:07 +0000, Frank Miles wrote:

[snip C code]
> What you're missing is that arr[] is an automatic variable.  Put a
> "static" in front of it, or move it outside the function (to become
> global) and you'll see the difference.

Ah, that makes sense. Thanks to everyone who corrected my 
misunderstanding.

Well, actually, no it doesn't. I wonder why C specifies such behaviour? 
Why would you want non-global arrays to be filled with garbage?


-- 
Steven



More information about the Python-list mailing list