global declarations
GEACC022%TIMEVX%CITHEX at lbl.arpa
GEACC022%TIMEVX%CITHEX at lbl.arpa
Fri Jan 11 09:54:04 AEST 1985
Received: from timevx by cithex with DECNET ; Thu, 10 Jan 85 15:53:05 PST
Date: Thu, 10 Jan 85 15:53:43 PST
From: geacc022 (ansok, gary e.) @ timevx
Message-Id: <850110155338.00b at timevx>
Subject: global declarations
To: info-c @ brl-tgr.arpa
I had always thought that the "right way" to declare global variables
was:
1) "extern" declaration in the .h file
2) definition (and initialization) in one .c file
Remember, it is legal to have both an "extern" declaration and a
definition in the same file (or at least it should be -- K&R, p. 77).
I haven't seen the standard, so I don't know what it says about this.
Gary Ansok
GEACC022%TIMEVX%CITHEX @ LBL-G.ARPA
GEA @ CALTECH.BITNET
...{ucbvax,ihnp4}!cithep!timevx#geacc022
"All the world loves a straight man."
More information about the Comp.lang.c
mailing list