home *** CD-ROM | disk | FTP | other *** search
- * ------------------------------------------------------------------------
- * Module......: XPDOS.PRG
- * Title.......: DOS part of the Expand Library Demonstration Program
- * Author......: Pepijn Smits.
- * Date........: July/August 1992
- * Copyright...: (c)1992 by Softwarebureau Pepijn Smits
- * Notes.......: Clipper 5.01 Demo of the Expand Library
- * Some general DOS functions
- * See XPDEMO.RMK For Compile and Link instructions.
- * ------------------------------------------------------------------------
-
- Function XPdemoInkey(n)
- /***
- * The Inkey Handler for the XPDEMO program
- */
- Local i,nKey
- if N == NIL // We've gotta continue right away!
- UpdateClock()
- nKey := Inkey()
- elseif N == 0 // Wait until Key is Pressed..
- While (nKey := Inkey()) == 0
- UpdateClock()
- end
- else // Wait n seconds for a Key..
- i := n
- While ((nKey := Inkey(1)) == 0) .and. (i>0)
- UpdateClock()
- i--
- end
- end
- Return (nKey)
-
- Static Function UpdateClock()
- Local c := SetColor()
- MenuColor()
- XPdisplay(0,MaxCol()-7,Time())
- SetColor(c)
- XPcolor()
- Return (NIL)
-