Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!ll-xn!mit-eddie!uw-beaver!ssc-vax!lee From: lee@ssc-vax.UUCP (Lee Carver) Newsgroups: comp.lang.c Subject: Re: Global variables (was Re: Caution for those considering MSC 5.0) Message-ID: <987@ssc-bee.ssc-vax.UUCP> Date: 19 Feb 88 00:11:30 GMT References: <11754@brl-adm.ARPA> <620@viper.Lynx.MN.Org> <2302@umd5.umd.edu> Organization: Boeing Aerospace Corp., Seattle WA Lines: 22 Summary: I bet you like implicit declarations, too! > All[*] global and static data in C is either initialised by the programmer > (in which case, if it does not have the proper value on startup, the > compiler is broken) or not initialised by the programmer (in which case, > if it does not have zero values[**] on startup, the compiler is broken). [flame on] So, you like the system to do things FOR you. I bet you like implict declarations. When was the last time you actually used 'int' to declare an integer variable? > >Rule of thumb is NEVER assume any UN-initialized variable contains > >zero (or NULL)... Thataway, let him have it! > You can do this if you wish. Remember, *automatic* variables are > indeed full of trash. NEVER, NEVER, NEVER assume the system is going to put something there unless you explicitly request it. It stops a lot of bugs dead in their tracks. You might get away with it if you don't, but how will you be sure?