Initialization in #include files
Leslie Mikesell
les at chinet.UUCP
Fri Jun 10 12:45:47 AEST 1988
In article <8046 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>>But the variables are very likely to be used in every source file, ...
>
>I do hope you people know better than to design software with lots
>of pathological inter-module connections like this.
OK, where do *you* put all the things that have default values that can
be altered by options on the command line? Do you use pathological
globals or pass about 50 parameters to every function called from main()?
What about state variables? What about things that need to be cleaned
up in case of interrupts or error exits? Somehow about 50% of the variables
seem to fall in one of these classes in a lot of my programs.
Les Mikesell
More information about the Comp.lang.c
mailing list