Mail Archives: djgpp/1997/02/28/20:56:45
>>linkage is internal to that file. You can't reference it in another
>>file.
>>
>>In other words, it's _not_ global across files if you do this.
>
> Isn't that what's wanted? When you try to link, you'll get an error
> saying that the link whatever can't be found - now you KNOW that that
> variable was accessed (else it wouldn't generate an error).
indeed that was my point. before actually 'finishing' with any program one of
the last things i do is remove all debug code and excess crap that tends to
accumlate while programming. the best way to deal with excess variables i find
is make all the global ones static and compile - if a variables wasn't
accessed at all it will tell you about it :) yes obviously the code won't
work, but then you remove the static part again after you've removed the
dead wood ;) it just struck me as easier i suppose that's all. probably
depends how you structure the programs and such though. if you have 546646
globals it wouldn't be a fun job i suspect ;)
regards,
nik
--
Graham Tootell
nikki AT gameboutique DOT com
- Raw text -