home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 15.2. Why you should not make direct references
- to printhead positions
- Author: Craig Yellick
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
-
- function Main()
- /*
- What's wrong with this code?
- */
- local line1, line2, i
- set device to printer
- line1 := 5
- line2 := 6
- @ line1, 0 say "Vendor"
- @ line2, 0 say "------------"
- i := 0
- use vendor new
- goto top
- do while .not. vendor->(eof())
- i ++
- @ 3 +i, 0 say vendor->name
- skip alias vendor
- enddo
- set device to screen
- close databases
- quit
- return nil
-
- // end of file CHP1502.PRG
-