Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucdavis!uop!jeff From: jeff@uop.edu (Jeff Ferguson) Newsgroups: comp.lang.c Subject: An Ethics Question Keywords: global variables Message-ID: <1819@uop.edu> Date: 6 Apr 89 18:35:43 GMT Organization: University of the Pacific, Stockton, CA Lines: 49 Here's a pretty basic ethics question: how do the mighty C programmers in netland have to say about global variables? Take, for example, the following two pieces of (idiotically simple) code: /********* Example 1 **********/ FILE *fp; main() { /* code */ } readfile() { /* code */ } /******** End Of Example 1 *********/ /******** Example 2 **********/ main() { FILE *fp; /* code */ } readfile(fp) { /* code */ } /******* End Of Example 2 ********/ Global variables or passed parameters? I'm anxiously awaiting the pros and cons of this issue. Thank you. -- Jeff Ferguson ...!{ucbvax|lll-crg}!ucdavis!uop.edu!jeff Computer Science Department ...!cepu!retix!uop.edu!jeff University of the Pacific jeff@uop.edu (209) 944 - 7105 "My father to the left of me, my mother to the right, Like everyone else they're pointing, but nowhere feels quite right" -- Genesis