| Menus and Menu Drivers |
| Caching in on the Frames Array - Mike Pope |
| What's New (and un(der)documented!) In 2.12 |
| Reader's Clinic - Naming Routines |
| SecureUser |
| Advanced Revelation Initialisation Sequence (Overview) by Mike Pope |
| QTIPS - What's DAT? |
| Reader's Clinic |
| Reader's Clinic - Functions and Subroutines |
| Reader's Letters - Jim Owen |
| Playing with Scan Codes |
| Argument passing - Subroutines and Functions - Mike Pope |
| 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 |
| 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 |
| Reader's Clinic - Capture Command and Captured Keystrokes |
| @ATTACK - @Macro.Hex |
| Capture Playback and Convert.Keystrokes |
RevMedia FKB
| Document | V1I9A19 |
| Title | Esc.To.Exit |
| Keywords | ESC.TO.EXIT DATA |
| Text | On the RevTech BBS a few months ago one of the users asked the question "how do I check to see if an 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 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 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(" 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) |
Page last modified: 30/01/03