home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 15.18. Checking for user-requested interruptions.
- 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 CheckAbort(r, c)
- /*
- If a keystroke is in the buffer, display prompt
- and wait for user response. Returns true if user
- wants to abort report.
- */
- local abort := .f.
- if inkey() <> 0
- set device to screen
- @ r, c clear to r +1, maxCol()
- @ r, c say "Printing paused..."
- @ r +1, c say "Do you want to abort the report?"
- abort := (chr(inkey(0)) $ "Yy")
- @ r, c clear to r +1, maxCol()
- if .not. abort
- set device to printer
- endif
- endif
- return abort
-
- // end of file CHP1518.PRG
-