home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a079 / 1.img / FPDG.LZH / VOL2NUM0 / MISC / BAD.PRG < prev    next >
Encoding:
Text File  |  1993-01-31  |  1.6 KB  |  50 lines

  1. *****************************************************************
  2. *     * 09/92               BAD.PRG                             *
  3. *****************************************************************
  4. *     * Author's Name: Jeb Long                                 *
  5. *     *                                                         *
  6. *     * Description:                                            *
  7. *     * This program illustrates the use of compiler to find bug*
  8. *     *                                                         *
  9. *****************************************************************
  10.  
  11. * Main procedure
  12. PROCEDURE BAD
  13.  
  14. * Set up database environment
  15.    DO Set_env
  16.    SET COLOR TO Z/Z
  17.    STORE "" TO part_id, part_name, descrip, vendor_id, commnt
  18.    STORE 0  TO price, cost, qty_onhand, qty_2order, lead_time
  19.    discontinu = .F.
  20.    dbf      = "GOODS"          && Standard report available
  21.    mlist    = NOT APPLICABLE"  && No mailing list available
  22.    cust_rpt = "N/A"            && No custom reports available
  23.    STORE "m->part_id" TO key, key1 
  24.    STORE "NONE" TO key2, key3 
  25.    list_flds = "PART_ID, PART_NAME, QTY_ONHAND"
  26.  
  27.    SELECT
  28.    USE Goods ORDO Part_id
  29.    GO TOP   This is bad syntax
  30.    * Define popup menus
  31.    DO Bar_def
  32.  
  33.    * Activate main popup menu--execute user choices
  34.    SET COLOR TO &c_popup. 
  35.    ACTIVATE POPUP main_mnu
  36.    *
  37.    PROCEDURE BAD
  38.    DO Filt_ans
  39.    DO WHILE .T. This is bad syntax
  40.    IF choice = "Y"
  41.       * Start process of choosing filter condition
  42.       IF "" = TRIM(mvendorid)
  43.     filters_on = .F.
  44.       ELSE
  45.        GO record_num
  46.     ENDIF
  47.    ENDDO
  48. RETURN
  49.  
  50.