Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!rutgers!cmcl2!adm!news From: CDCKAB%EMUVM1.BITNET@cunyvm.cuny.edu ( Karl Brendel) Newsgroups: comp.lang.pascal Subject: Re: Overflow error Message-ID: <27233@adm.brl.mil> Date: 18 Jun 91 17:02:47 GMT Sender: news@adm.brl.mil Lines: 42 In <2547@cybaswan.UUCP> cslaurie@cybaswan.uucp (Laurie Moseley) wrote: [...deleted...] >What's all this stuff about GETSTRING; - a parameter-less procedure. >OK, there may be occasions when you need one, but they are rare in >these days when one actually re-uses code. I don't believe that it >is purist to shudder at such constructions, it's simply commonsense. >You may get away with parameter-less procedures occasionally, but >all too frequently one of two things will happen. You'll either get >identifier confusion and manipulate a global unintentionally (and >have some interesting evenings trying to find that !) or you will >find that you have written the same procedure 7 times before you >realise that it IS the same one. > >I guess that the point is that if you get into good habits early, >you have fewer disasters later. To put on the humility hat for a >moment - am I missing something important here ? Perhaps. While I agree with most of the points that you have made so well, I must speak up in defense of "parameter-less procedures". Procedures are not only a means to the creation of reusable code, but a means of organizing source so that it becomes more readable and even (yes) more maintainable. There are others who also _may_ not be purists (as if that were always an objectionable state of being ) who would prefer to see every routine fit on one screen or possibly one sheet of hardcopy. I am not advocating that extreme--but I find that I can read and maintain code much more easily if routines are smaller and carry mnemonic names--and I don't feel the need of forcing each routine to have parameters in order to accomodate that. Cheers-- --Karl +====================================================================+ | Karl Brendel Centers for Disease Control | | Internet: CDCKAB@EMUVM1.BITNET Epidemiology Program Office | | Bitnet: CDCKAB@EMUVM1 Atlanta GA 30333 USA | | Home of Epi Info 5.0 | +====================================================================+