Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Bleeding pragmata (was: Re: unicode and Perl- howto pass command line unicode arguments)



On Fri, 17 Feb 2006, Josh Glover wrote:

>> Although if I want a global (or file static) somewhere localised I might
>> well not put it at the top of the file.  I certainly don't put variable
>> definitions at the top of functions any more.
>
> Good luck with that if you are writing C code...

The C99 standard allows variable declarations anywhere inside a block, not 
just at the top.  This can be a useful technique for limiting the scope of 
variables to just the section of code where they are used.

C99 has been supported in gcc since gcc 3.x

http://en.wikipedia.org/wiki/C99#C99
-- 
Tod



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links