home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / 9445 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.1 KB  |  52 lines

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