home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
EXITKEY.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
3KB
|
51 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME EXITKEY .DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
'.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
$INCLUDE "DAS-NB01.INC"
COLOR 7, 0
CLS
? "┌───────────────────────────────────────────────────────────────
? "│ fExitKey%( Exet$, KeyPress% )
? "├────────────────────────────────────────────────────────────────────
? "│ This function checks for an <<< EXACT >>> match of KeyPress% in Exet$
? "└────────────────────────────────────────────────────────────────────────
Exet$ = CHR$(013,000,027,000,000,068,000,059) ' CHR$(000,068) is F-10
' <enter> <esc> <f10> <f-1> '
'
G$ = "D" ' G$ = "D"
? "IS 'D' IN CHR$(13,0,27,0,0,68,0,59) "; '
IF INSTR( Exet$, G$ ) = 0 THEN PRINT "NOT "; ' this returns "FOUND"
PRINT "FOUND" ' which is true but G$
PRINT '
' is NOT one of the keys
' we were looking for!
G% = CVI( G$+CHR$(0) ) ' convert to integer
? "NOW CHECK IF 'D' IS _NOT_ THERE: "; '
IF NOT fExitKey%( Exet$, G% ) THEN PRINT "NOT "; ' Now we get a NOT FOUND
PRINT "FOUND" '
PRINT '
'
G% = CVI( CHR$(000,068) ) ' NOW G% = F10
? "LOOKING FOR 'F10' IN CHR$(13,27,0,68,0,072) "; '
IF NOT fExitKey%( Exet$, G% ) THEN PRINT "NOT "; ' and we get a "FOUND"
PRINT "FOUND" '