home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 26.8 Using col Instance Variable to Move GETs
- Author: Greg Lief
- 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
- */
-
- //───── NOTE: must compile with the /N option!
-
- function main
- local a := { 0, 0, 0, 0, 0 }
- cls
- @ 8, 30 say "Debits"
- @ 8, 50 say "Credits"
- @ 10,10 get a[1] valid debitcredit()
- @ 11,10 get a[2] valid debitcredit()
- @ 12,10 get a[3] valid debitcredit()
- @ 13,10 get a[4] valid debitcredit()
- @ 14,10 get a[5] valid debitcredit()
- read
- return nil
-
-
- function debitcredit
- if getactive():varGet() > 0
- getactive():col = 50
- else
- getactive():col = 30
- endif
- return .t.
-
- // end of file CHP2608.PRG
-