Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!sunic!tut!ra!rosenber From: rosenber@ra.abo.fi (Robin Rosenberg INF) Newsgroups: comp.sys.amiga.tech Subject: Re: Lattice and externals Message-ID: <173@ra.abo.fi> Date: 14 Nov 89 18:08:27 GMT References: <704@crash.cts.com> Organization: Abo Academy, Finland Lines: 16 In article <704@crash.cts.com>, wade@pnet01.cts.com (Wade Bickel) writes: > I'm using Lattice C and have declared a pointer with the same name in two > seperate modules. Neither has the "extern" keyword in front of it, and I'd > like each to be local to its own module (soon almost all of my modules will > need such a pointer, and I'd like to avoid naming confusion). > When I link the program blink barfs on a "symbol redefined" error. Should > this be happening? > Thanks -- Wade. The keyword 'static' serves three purposes. - it declares the variable as static (default for global variables) - hides the name from other modules (what you wanted) - *guarantees* that the variable is initialized (to zero unless value specified) ---------- Robin Rosenberg