home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!destroyer!news.iastate.edu!ponderous.cc.iastate.edu!viking
- From: viking@iastate.edu (Dan Sorenson)
- Subject: Re: dBASE III+/Foxbase Question
- Message-ID: <viking.728188454@ponderous.cc.iastate.edu>
- Sender: news@news.iastate.edu (USENET News System)
- Organization: Iowa State University, Ames IA
- References: <1jsb6gINN5kj@golem.wcc.govt.nz> <1993Jan27.081213.22583@pegasus.com>
- Date: Thu, 28 Jan 1993 02:34:14 GMT
- Lines: 40
-
- tleylan@pegasus.com (Tom Leylan) writes:
-
- >Avoid uncontrolled loops. Yes you can EXIT, no you should not. Set a
- >variable or controlling expression and exit from the end of the loop.
-
- One thing I've started doing is naming my endless loops something
- appropriate, like hellfreezesover, pigsfly, etc...
-
- >Consider not adding a CASE statement that doesn't do anything. If you
- >need an empty "default" the OTHERWISE "case" is provided but even that
- >isn't needed here.
-
- Always use the OTHERWISE clause, even if it's to place something
- like: OTHERWISE
- clear
- @10,10 say 'You should never see this. There has been an error.'
- @12,10 say 'Please press your PrintScreen button to document this.'
- do myerroroutine with (enter your own parameters you like)
- wait
- clear
- @5,10 say 'Since this is so unusual, let's quit and start over.'
- wait
- quit
- Endcase
-
- >Hope this has been of some benefit to the parties involved,
-
- Even if it hasn't, it's going to be of invaluable benefit to
- the next person who is charged with maintaining your code. After a
- few months of minor changes, I like to run FoxDoc and place output in
- a folder for the unlikely event I'll be sick or get a six-figure job
- in Rio handed to me. Whoever replaces me will have it much easier,
- and this kind of attention to your replacement makes for glowing
- references from managers.
-
- < Dan Sorenson, DoD #1066 z1dan@exnet.iastate.edu viking@iastate.edu >
- < ISU only censors what I read, not what I say. Don't blame them. >
- < USENET: Post to exotic, distant machines. Meet exciting, >
- < unusual people. And flame them. >
-
-