Category : Files from Magazines
Archive   : DBMS9104.ZIP
Filename : TECHTIP1.APR
* Listing 1A
* For dBASE IV, FoxPro, Clipper
*
* In Clipper, replace the ON KEY LABEL command with
* SET KEY
PUBLIC exit_read
STORE .f. TO exit_read
ON KEY LABEL F2 DO ExitLoop
.
.
.
* Data entry @ SAY/GETS here
.
.
.
DO WHILE .NOT. exit_read
READ SAVE
ENDDO
* Put the rest of your data entry code here
PROCEDURE ExitLoop
STORE .t. TO exit_read
KEYBOARD
* Listing 1B
* For SophcoÕs Force
VARDEF
LOGICAL exit_read = .f.
ENDDEF
PROCEDURE data_entry
ON KEY DO check_key_stroke && acts as a keystroke filter
.
.
.
* Data entry @ SAY/GETS here
.
.
.
DO WHILE .NOT. exit_read
READ SAVE
ENDDO
* Put the rest of your data entry code here
ENDPRO
FUNCTION check_key_stroke
VARDEF
UINT TheKey
ENDDEF
TheKey = Lastkey()
DO CASE
CASE TheKey = &K_F2
exit_read = .t.
RETURN 0 && Ignore this keystroke
OTHERWISE
RETURN TheKey && Pass the keystroke thru
ENDCASE
ENDPRO
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/