home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 4.3 Showmsg() with the NIL datatype
- 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!
-
- #include "Box.ch"
-
- function ShowMsg(msg, boxcolor, msgcolor)
- local buffer, leftcol := int(76 - len(msg)) / 2
- // assign box color
- if boxcolor == NIL .or. valtype(boxcolor) <> "C"
- boxcolor := 'W/R'
- endif
- // assign message color
- if msgcolor == NIL .or. valtype(msgcolor) <> "C"
- msgcolor := '+W/R'
- endif
- buffer := savescreen(11, leftcol, 13, 80 - leftcol)
- dispbox(11, leftcol, 13, 80 - leftcol, B_DOUBLE + ' ', boxcolor)
- @ 12, leftcol + 2 say msg color msgcolor
- inkey(2)
- restscreen(11, leftcol, 13, 80 - leftcol, buffer)
- return NIL
-
- // end of file CHP0403.PRG
-