Re: Paasing global variables to functions



ankisharma@xxxxxxxxx wrote on 28/07/05 :
At many places I have seen that programmers pass global variables
to functions in c.

Sounds weird. If a variable has a global scope, it's inconsistent to pass it to a function (via a parameter, I guess)...


That said, better to avoid global scope variables at all...

--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html

"There are 10 types of people in the world today;
those that understand binary, and those that dont."


.