Re: Paasing global variables to functions
- From: Christian Bau <christian.bau@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 22:33:12 +0100
In article <mn.e55c7d5777f717ac.15512@xxxxxxxxxxxxxx>,
"Emmanuel Delahaye" <emdel@xxxxxxxxxxxxxx> wrote:
> 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)...
So you would you print the contents of a global variable using printf
(), for example?
> That said, better to avoid global scope variables at all...
.
- References:
- Paasing global variables to functions
- From: ankisharma
- Re: Paasing global variables to functions
- From: Emmanuel Delahaye
- Paasing global variables to functions
- Prev by Date: Re: Copying a struct to a larger struct?
- 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):
Relevant Pages
|