Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!kuhub.cc.ukans.edu!karlj From: KARLJ@kuhub.cc.ukans.edu Newsgroups: alt.religion.computers Subject: Re: Shoulds arrays start at zero or one? Message-ID: <21661@kuhub.cc.ukans.edu> Date: 19 Jan 90 19:51:34 GMT References: <5487@udccvax1.acs.udel.EDU> <252@usblues.UUCP> <1990Jan16.173034.25686@murdoch.acc.Virginia.EDU> Distribution: na Organization: University of Kansas Academic Computing Services Lines: 26 In article <1990Jan16.173034.25686@murdoch.acc.Virginia.EDU>, gl8f@astsun.astro.Virginia.EDU (Greg Lindahl) writes: > > Of course, the performance implications of "var" are enormous and often > not told to Pascal students. "I'm passing this 50k array into a procedure, > and, oh, well I don't want to modify it, so I'd better not make it var." > Then your stoopid Pascal compiler makes a local copy... > This is so very true! The same thing can be said about global variables. Often, instructors will tell their students to never use globals. Instead, they have them pass the globals into a procedure as a val parameter. In the same vain, they tell students to only pass variables in as var only if a change is to be made. It would seem to be more prudent to inform students of exactly what happens when a variable is passed and urge extreme caution; however, I don't get to make the rules. > > Greg Lindahl > gl8f@virginia.edu Astrophysicists for Choice. karl smith karlj@kuhub.cc.ukans.edu "But before I rise, man, why not roll still another one, to make sure I'm really stoned, because sometimes, man, in my condition, it is hard to tell." Horse Badorties _The Fan Man_ by William Kotzwinkle