Path: utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!ucsd!usc!apple!oliveb!amiga!jimm From: jimm@amiga.UUCP (Jim Mackraz) Newsgroups: comp.sys.amiga.tech Subject: Re: Lattice and externals Message-ID: <4861@amiga.UUCP> Date: 19 Nov 89 10:30:13 GMT References: <704@crash.cts.com> Reply-To: jimm@batgirl.UUCP (Jim Mackraz) Organization: Commodore-Amiga Inc, Los Gatos CA Lines: 24 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. Yes, it's correct. You must either explicitly declare like-named variables to be the same, by saying 'extern' with all but one, or different, by using 'static'. When used on a 'global', static means 'with scope in this source file.' Just what you want. jimm -- -------------------------------------------------- - opinions by me "This voice console is a *must*. I press Execute. `Hello, I know that you've been feeling tired. I bring you love and deeper understanding.' " -lyrics by Kate Bush