home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- * * 09/92 BAD.PRG *
- *****************************************************************
- * * Author's Name: Jeb Long *
- * * *
- * * Description: *
- * * This program illustrates the use of compiler to find bug*
- * * *
- *****************************************************************
-
- * Main procedure
- PROCEDURE BAD
-
- * Set up database environment
- DO Set_env
- SET COLOR TO Z/Z
- STORE "" TO part_id, part_name, descrip, vendor_id, commnt
- STORE 0 TO price, cost, qty_onhand, qty_2order, lead_time
- discontinu = .F.
- dbf = "GOODS" && Standard report available
- mlist = NOT APPLICABLE" && No mailing list available
- cust_rpt = "N/A" && No custom reports available
- STORE "m->part_id" TO key, key1
- STORE "NONE" TO key2, key3
- list_flds = "PART_ID, PART_NAME, QTY_ONHAND"
-
- SELECT
- USE Goods ORDO Part_id
- GO TOP This is bad syntax
- * Define popup menus
- DO Bar_def
-
- * Activate main popup menu--execute user choices
- SET COLOR TO &c_popup.
- ACTIVATE POPUP main_mnu
- *
- PROCEDURE BAD
- DO Filt_ans
- DO WHILE .T. This is bad syntax
- IF choice = "Y"
- * Start process of choosing filter condition
- IF "" = TRIM(mvendorid)
- filters_on = .F.
- ELSE
- GO record_num
- ENDIF
- ENDDO
- RETURN
-