Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zephyr.ens.tek.com!vice!bobb From: bobb@vice.ICO.TEK.COM (Bob Beauchaine) Newsgroups: comp.lang.pascal Subject: Re: Overflow error Message-ID: <7631@vice.ICO.TEK.COM> Date: 18 Jun 91 23:46:16 GMT References: <27233@adm.brl.mil> Reply-To: bobb@vice.ICO.TEK.COM (Bob Beauchaine) Organization: Tektronix, Inc., Beaverton, OR. Lines: 47 In <2547@cybaswan.UUCP> cslaurie@cybaswan.uucp (Laurie Moseley) wrote: >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 ? { On pulpit } I guess you haven't written any Test and Measurement code (in a while) (ever). I daily write/modify programs with thousands of lines of code that manipulate hardware and test equipment. Parameter-less procedures are the *only* to make some of this code both modular and maintainable, especially since I am not the person sustaining this code x number of years down the road. Many of the mundane tasks and routines performed by this kind of code are very well known in advance. Hooking up ports, initializing equipment, powering up supplies, etc.... You don't need parameters to this kind of procedure, and indeed these procedures keep you from re-writing code dozens of times sprinkled throughout the program. I wouldn't comment, except your second paragraph implies that I do not practice good programming habits. To which I say--- Ack, Phhhttttt. { Off pulpit } /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ Bob Beauchaine bobb@vice.ICO.TEK.COM C: The language that combines the power of assembly language with the flexibility of assembly language. God is real, unless declared integer.