Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!mcnc!rti!tijc02!pjs269 From: pjs269@tijc02.UUCP (Paul Schmidt ) Newsgroups: comp.lang.c Subject: Re: An Ethics Question Message-ID: <436@tijc02.UUCP> Date: 10 Apr 89 15:35:45 GMT References: <1819@uop.edu> Organization: Texas Instr., Johnson City TN Lines: 15 > Global variables or passed parameters? I'm anxiously awaiting the pros > and cons of this issue. Thank you. There is a proper way of doing global variables in C programming that is supported by a design methodology. In the paper "Two-Dimensional Program Design," by Shmuel Rotenstreich and William E. Howden, in IEEE Transactions on Software Engineering, Vol. SE-12, No. 3, March 1986, the authors describe a modification of structured design techniques that can be easily implemented in C only by global variables. They contend that it is wasteful and more confusing to pass variables from lower level routines through higher level routines and back to lower level routines with the higher level routine never using it. The use of "static" also helps to hide the variables from the higher level routines so that no higher level routine can ever use these variables.