home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 26.3 Example of Nested READ
- 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!
-
- memvar getlist // to squelch compiler warnings
-
- function main
- local x := 0, mdate := date() + 14
- cls
- @ 10, 10 say "Balance: " get x picture '#####.##' valid credit(@x)
- @ 11, 10 say "Due date:" get mdate
- read
- return nil
-
- function credit(balance)
- local x := 0, getlist := {}, oldscrn := savescreen(10, 40, 10, 64)
- @ 10, 40 say "Credit (if any):" get x picture '#####.##'
- read
- balance -= x // subtract credit from original balance
- restscreen(10, 40, 10, 64, oldscrn)
- return .t.
-
- // end of file CHP2603.PRG
-