Re: keyword extern
From: Minti (mintiSPAMBLOCK_at_yahoo.com)
Date: 06/26/04
- Next message: tweak: "Re: keyword extern"
- Previous message: Foobarius Frobinium: "Re: [OT] My girlfriend in a wet white bra 2194"
- In reply to: Emmanuel Delahaye: "Re: keyword extern"
- Next in thread: Emmanuel Delahaye: "Re: keyword extern"
- Reply: Emmanuel Delahaye: "Re: keyword extern"
- Reply: Dan Pop: "Re: keyword extern"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 Jun 2004 13:37:30 -0700
Emmanuel Delahaye <emdelYOURBRA@noos.fr> wrote in message news:<Xns951474F0A1393hsnoservernet@212.27.42.72>...
> In 'comp.lang.c', umbs.sairam@gmail.com wrote:
>
> > One of the purposes of using extern in multiple files is restricting
> > the visibility of the variable only to the file that needs to "see"
> > it.
>
> It certainely is a bad practice. What if the type changes (int to long, float
> to double, etc.) ? Because the compiler has no way to check the consistency
> of the code, if you miss a change the code becomes inconsitent. This practice
> is obviously wrong.
>
> If you are concerned with the visibility of the global variables, which
> is a good thing, there are other options:
>
> - don't use global at all. (Use ADT's)
Could you elucidate this point?
-- Imanpreet Singh Arora isingh AT acm DOT org
- Next message: tweak: "Re: keyword extern"
- Previous message: Foobarius Frobinium: "Re: [OT] My girlfriend in a wet white bra 2194"
- In reply to: Emmanuel Delahaye: "Re: keyword extern"
- Next in thread: Emmanuel Delahaye: "Re: keyword extern"
- Reply: Emmanuel Delahaye: "Re: keyword extern"
- Reply: Dan Pop: "Re: keyword extern"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|