Redefining Keys
Background Processing
Reader's Clinic - Prompting for Passwords
Capture
Creating Your Own Background Processes
@ATTACK - @Edit.Keys
@ATTACK - @Index.Time
@ATTACK - @PlayBack
@ATTACK - @Priority.Int
How Indexes Are Updated
A RevTechie Replies - And Miscellaneous Jottings - Mike Pope - Revelation Technologies (UK) Ltd
QTIPS - Use of Mouse
QTIPS - Interrupt Proof Error Messages
Uncommon Knowledge - WC_Soft_Keys%
A RevTI Techie Replies - Mike Pope - Revelation Technologies (UK) Ltd
Version 3 Technical Highlights - Input.Char
Version 3 Technical Highlights - @Prog.Char
Version 3 Technical Highlights - Highlight
Menus and Menu Drivers
Caching in on the Frames Array - Mike Pope
What's New (and un(der)documented!) In 2.12
@ATTACK - @Macro.Words
SecureUser
VERBatim - V86
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
@ATTACK - @CPU.Type
QUERY.SUB
QTIPS - Query Windows - Changing Colours
Readers Clinic - Quickly Coping with \
VERBatim - V39
Esc.To.Exit
Reader's Clinic - Naming Routines
SecureUser
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
QTIPS - What's DAT?
Reader's Clinic
Playing with Scan Codes
QTIPS - DOS File Names
DOS Interfacing (Part II)
VERBatim - V116
@ATTACK - @Pri.File
@ATTACK - @Rollout.File
File Variables
How Indexes Are Updated
Index Record Layouts
QTIPS - File Variable of File In SELECT Statement
QTIPS - Amending non-Attached Files
LINEAR HASH FILE STRUCTURES - Part 1
Index Flush
QTIPS - File Handle Structure
Reader's Clinic - Functions and Subroutines
Reader's Letters - Jim Owen
Playing with Scan Codes
Argument passing - Subroutines and Functions - Mike Pope
Background Processing
Vroom - Window Processing
VROOM - Window Processing II
QTIPS - Testing For Boolean False
Redefining Keys
Referential Integrity
@ATTACK - @Edit.Keys
@ATTACK - @Environ.Keys
@ATTACK - @Int.Const
@ATTACK - @Move.Keys
@ATTACK - @Priority.Int
@ATTACK - @Macro.Keys
@ATTACK - @Macro.Mode
Playing with Scan Codes
Uncommon Knowledge - WC_Unkeys%
Uncommon Knowledge - WC_Except_Keys%
Uncommon Knowledge - WC_Soft_Keys%
VERBatim - V126
Esc.To.Exit
Uncommon Knowledge - WC_WST_CHAR%
Playing with Scan Codes
QTIPS - Compiling Protection Code
QTIPS - Invalid Code and Command
QTIPS - Code/Command Help
Compiling 64K on a Shoestring by Blaise Wrenn (LexStat Systems Ltd)
QTIPS - DOSTime
VERBatim - V11
@ATTACK - @Backgrnd.Time
@ATTACK - @Index.Time
QTIPS - Time-outs in Windows
@ATTACK - @Modal
What's New (and un(der)documented!) In 2.12
Utility Diskette # 4
Reader's Clinic - Line Length > 256 Characters
QTIPS - String Space
QTIPS - String Space Format Errors
Reader's Forum - Numeric Precision in R/Basic - Hal Wyman
Playing with Scan Codes
What's New (and un(der)documented!) In 2.12
Reader's Clinic - Capture Command and Captured Keystrokes
@ATTACK - @Macro.Hex
Capture Playback and Convert.Keystrokes
Reader's Clinic - Page Marks in Windows

RevMedia FKB

DocumentV1I9A19
TitleEsc.To.Exit
KeywordsESC.TO.EXIT
DATA
TextOn the RevTech BBS a few months ago one of the users asked the question
"how do I check to see if an key has been pressed without losing what
was already in the input buffer ?" In other words if I am in a lengthy
processing LOOP FROM which the user ought to be able to escape by pressing
how do I allow this facility but still allow them to type ahead ?"
As this query was never answered I have taken the liberty of USING this
query as an entry point to the discussion of ESC TO EXIT

Fortunately for the inquisitive developer RevTech use meaningful NAMES for
most of their subroutines (with the possible execption of the Verbs the
RTPs and FAT FINGER (see later)) so studying the VERBS file provided the
answer a routine called ESC TO EXIT This is a function which called from
a processing LOOP returns true if was pressed and false if it was
not However any keys awaiting processing whilst ESC TO EXIT was being
called would be left in the data buffer To illustrate this try the
following section of code

DECLARE FUNCTION ESC TO EXIT
EQU TRUE$ TO 1
EQU FALSE$ TO 0
*
* Set a time for the LOOP to repeat
*
END LOOP = TIME() + 4
USER ESCAPED = FALSE$
LOOP
*
* Insert processing LOOP here
*
UNTIL TIME() > END LOOP OR USER ESCAPED
IF ESC TO EXIT() THEN USER ESCAPED = TRUE$
REPEAT
IF USER ESCAPED THEN
CALL MSG(" key pressed" "" "" "")
END ELSE
*
* Now build a string to show what has been buffered in the data
* statement
*
NEW = ""
LOOP
INPUT X 1
WHILE X DO
NEW := X
REPEAT
CALL MSG(NEW : " entered" "" "" "")
END

It is apparent FROM the above description that when USING the ESC TO EXIT()
function the user is not restricted to the standard keyboard buffer (the
data entered being appended to the DATA STATEMENT not stored in the keyboard
buffer) Thus USING this method the user could type ahead up to a maximum of
64K This is either an advantage or a disadvantage depending upon your
trusting your users to know what they are typing AFTER 15 keystrokes !


(Volume 1 Issue 9 Page 9)
[revmedia/copyrigh.htm]

Page last modified: 30/01/03