home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / db4bugs.zip / ANOM_12.TXT next >
Text File  |  1989-06-06  |  4KB  |  117 lines

  1. ANOMALIES UPLOADED ON 6-6-89
  2.  
  3.  
  4.                                    ANOMALY 12.TXT
  5.  
  6.  
  7. The following listing addresses two known anomalies when using
  8. dBASE IV.  Use of these techniques will aid you in avoiding
  9. anomalies that have been reported to our Software Support
  10. Center.  There are also two usage-tips that may be used in order
  11. to avoid further problems or misunderstandings when using the
  12. dBASE IV product.  This report will be supplemented as new
  13. information is received.  
  14.  
  15.  
  16. *******************************************************************
  17.  
  18.  
  19.                                    ANOMALIES
  20.  
  21.  
  22. Renaming a .DBO will cause "Procedure not found" error
  23.  
  24.      If a compiled .DBO file is renamed, the resultant file
  25.      cannot be run.  Attempting to do so will return the error,
  26.      "Procedure not found <new-name>.prs".  This fact should have
  27.      been documented under the commands DO, COMPILE, and
  28.      BUILD/DBLINK.  
  29.      
  30.      Since every program file becomes its own main procedure file
  31.      and, in addition, when a file is compiled its name becomes
  32.      compiled into the resultant .DBO, simply renaming a file
  33.      will not change the references to the original filename in
  34.      the .DBO file.  When the newly named file calls itself as a
  35.      main procedure, this name is not the same as the filename of
  36.      the main procedure compiled into the .DBO and the error is
  37.      returned.
  38.      
  39.      Rather than renaming the .DBO file, the .PRG should be
  40.      renamed prior to compiling.
  41.      
  42. ===================================================================
  43.  
  44.  
  45. CONVERT requires exclusive use of the file
  46.  
  47.      The CONVERT command requires that the file to be CONVERTed
  48.      be used in EXCLUSIVE mode.  On page 4-4 of Networking with
  49.      dBASE IV, CONVERT TO is correctly included in the list of
  50.      commands requiring exclusive use.  This requirement is not
  51.      documented on pages 2-59 or 60 of Language Reference nor 
  52.      page 4-13 of Networking with dBASE IV.  
  53.      
  54.                                  USAGE-TIPS
  55.  
  56.  
  57. @M will override other templates and functions
  58.  
  59.      The multiple choice picture function, @M, uses the literal
  60.      values provided in the picture clause.  Therefore, The @M
  61.      function will override any other picture or template
  62.      function used in conjunction with it.
  63.      
  64.      EXAMPLE:
  65.      
  66.         STORE SPACE(20) TO Part_name
  67.         @10,10 GET Part_name PICTURE "@M! Sofa, Bed, Chair"
  68.      
  69.      This example always returns the options as initial caps only
  70.      instead of all caps.  Therefore, the enumerated data must be
  71.      entered in all upper-case within the picture template if an
  72.      upper-case template is desired.
  73.      
  74. ===================================================================
  75.  
  76.  
  77. SCAN...ENDSCAN and how records are moved within the construct
  78.  
  79.      The SCAN ... ENDSCAN construct is meant to handle record
  80.      positioning itself.  It varies from the DO WHILE ... ENDDO
  81.      construct in the sense that a
  82.      DO WHILE is a looping mechanism, doing a certain operation
  83.      multiple times. 
  84.      DO ... WHILE does not automatically change the record
  85.      pointer, where-as in a SCAN ... ENDSCAN construct, the
  86.      record pointer update is handled internally.   
  87.      
  88.      SCAN                           DO WHILE .NOT. EOF()
  89.      ...                                ...
  90.                 is equivalent to        SKIP
  91.      ...                                ...
  92.      ENDSCAN                        ENDDO
  93.      
  94.      Therefore, having the record pointer repositioned within the
  95.      SCAN ... ENDSCAN construct may cause the record pointer to
  96.      be improperly adjusted.
  97.      
  98.      EXAMPLE:
  99.      
  100.      USE <database name>
  101.      SCAN While .T.
  102.         LIST NEXT 10 <field name>
  103.         IF EOF()
  104.             GO TOP
  105.         ENDIF
  106.         CLEAR
  107.      ENDSCAN
  108.      
  109.      The example above is intended to list 10 records at a time,
  110.      doing consecutive passes through the database.  The first
  111.      record of the database is only listed during the first pass
  112.      through the file.  After the IF EOF() statement, GO TOP
  113.      positions the record pointer at the top of the database, but
  114.      since ENDSCAN internally changes the record pointer, a
  115.      second SKIP is issued and the LIST command will start on the
  116.      second record of the file.
  117.