Thread (3 messages) flat view 3 messages, 2 authors, 2012-09-21

ANSI C rules for variable declaration

From: Lokesh Walase <hidden>
Date: 2012-09-21 04:45:01

Hi all,

0.I read that ANSI C rules for variable declaration says that one must
declare the variables at the beginning of any scope block.
 C99 onwards we are allowed to declare variables as & how required.

1.NOW, my doubt is what happens in the actual "practical/real-world" codes
that are written in industry.
*Do everyone *strictly* follow the ANSI C rules & declare the variables at
the beginning of the scope ? *

2.Also , why are we still following that old rule ? *Is it so that old
codes of 70s can be used with new codes ?*

3.There must be some standard that all of us need to follow , so what are
they ?
This point is very crucial for free & open-source projects , where people
all around world write codes.

*Can any one redirect me to some links/tutorials for the same ?*

Regards,
free4freedom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120921/62804e03/attachment.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help