Re: Paasing global variables to functions
- From: "Emmanuel Delahaye" <emdel@xxxxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 22:52:06 +0200
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."
.
- Follow-Ups:
- Re: Paasing global variables to functions
- From: Christian Bau
- Re: Paasing global variables to functions
- References:
- Paasing global variables to functions
- From: ankisharma
- Paasing global variables to functions
- Prev by Date: Re: system() and no console ?
- Next by Date: Re: Paasing global variables to functions
- Previous by thread: Re: Paasing global variables to functions
- Next by thread: Re: Paasing global variables to functions
- Index(es):