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

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