home *** CD-ROM | disk | FTP | other *** search
/ Big Blue Disk 2 / bbd02.zip / BITS&PCS.TXT < prev    next >
Text File  |  1986-10-20  |  4KB  |  73 lines

  1. ^1                                  BITS 'N PC's
  2.                                By Joel Ellis Rea
  3.  
  4.  
  5. A collection of Hints, Tips and Bug Reports for all programmers and interme-
  6. diate to advanced users.  
  7.  
  8. BUG REPORT -- Microsoft QuickBASIC Version 2.0:  This is an excellent pro- 
  9. gramming language.  We use it ourselves to compile BASIC and BASICA programs 
  10. that users submit to us, so that they can run on all machines with minimum 
  11. problems.  It includes an integral mouse/keyboard full-screen editor with pop-
  12. up menus, much like you'd expect in Microsoft Windows or the Macintosh.  
  13.  
  14. The bug is in the DEBUG compiler option.  This option, when set, allows the 
  15. system to locate the point of a run-time error and map it to the source code so 
  16. you can see where it is.  It also adds checking between statements for a CTRL/ 
  17. BREAK keypress to stop an infinite loop.  All this adds to the length of the 
  18. compiled program, and slows execution somewhat.  
  19.  
  20. Most people turn DEBUG off when the program is fully debugged so it will be as 
  21. small and/or as fast as possible.  The problem is that turning DEBUG off can 
  22. have unexpected, sometimes subtle, sometimes dramatic side-effects.  These in-
  23. clude erroneous responses to mathematical expressions, and programs failing to 
  24. compile with an "Expression too complex" error, even though the expression in 
  25. question may be a simple constant value.  
  26.  
  27. I discovered the erroneous results bug when a 3-D Fractal Landscape generating
  28. program I was translating for BIG BLUE DISK drew wildly different pictures with
  29. DEBUG off than with DEBUG on.  It was as if the whole concept of graphics 
  30. coordinates had changed on me.  With a program that does NOT do graphics, but 
  31. instead produces numeric results, this might go unnoticed until it wreaks havok 
  32. with a business report, or possibly even serious or fatal damage to a person, 
  33. should a doctor use a QuickBASIC program to manage a patient's drug dosages.  
  34. After all, the program worked just fine in all tests while being debugged, and 
  35. a simple DEBUG option isn't supposed to affect calculations.  
  36.  
  37. Microsoft, this bug is FAR more serious than you perhaps realize.  Lotus is 
  38. being sued right now for a quarter-million dollars on a claim that 1-2-3 failed 
  39. to calculate a spreadsheet correctly, and if that suit succeeds, you and many 
  40. other software developers WILL be held liable for damages resulting from pro- 
  41. grams and languages which do not perform as advertised.  The legal validity of 
  42. the common "as-is" warranty is being questioned -- many attorneys say that an 
  43. "as-is" warranty is legally no warranty at all.  I suggest a recall of Quick-
  44. BASIC 2.0 and a release of a fixed version, free to all registered users.  
  45.  
  46. Until this occurs, if you program in QuickBASIC, for now leave the DEBUG flag 
  47. on, even after the program is fully debugged.  QuickBASIC seems to work fine 
  48. that way, and the only penalties are slightly slower execution and larger 
  49. compiled code.  If you MUST have the faster speed and/or smaller code, subject 
  50. your program to another extensive round of testing after you turn DEBUG off to 
  51. be sure it still produces consistent results.  
  52.  
  53.                            --------------------------
  54.  
  55. HANDY TIP:  If you have a MONOCHROME monitor or B&W TV available, you can 
  56. easily check to see if common objects pose a threat to the life and limb of 
  57. your precious data on your disks.  Magnetic fields have been known to inflict 
  58. severe, permanent amnesia on floppies.  Say you need to open the case of your 
  59. computer to install a new board or some more RAM, but you don't know if the 
  60. screwdriver you are using is magnetized or not.  Simply wave it in front of a 
  61. monochrome monitor or B&W TV with a display on-screen.  Anything with a mag- 
  62. netic field powerful enough to damage a disk will cause the picture to bend and 
  63. twist as the object passes by.  DO NOT TRY THIS ON A COLOR MONITOR OR TV!!!  
  64. This will cause lasting, but correctable, discolored areas on the screen.  If a 
  65. color tube has such a discoloration on it, a repairman can fix it quickly and 
  66. inexpensively with a "de-gausser" (a special de-magnetizer).  
  67.  
  68.                            --------------------------
  69.  
  70. That's all for this issue; if you have any hints, tips, suggestions, or 
  71. requests for help on a PC-related topic, please send them in to us; see the 
  72. article, How To Disk Us, for details.  
  73.