TIP: Click on subject to list as thread! ANSI
echo: quik_bas
to: DAVID WILLIAMS
from: KURT KUZBA
date: 1998-04-10 00:49:00
subject: Old Folks

DW>   My inclination would be to write the INKEY loop as
DW>   something like:
DW>   DO: k$ = UCASE$(INKEY$): LOOP UNTIL k$ >= "A" AND k$ <= "G"
DW>   Then simply PRINT k$
DW>   Wouldn't that be a whole lot simpler?!
   Infinitely!
   But menus don't usually use sequential characters.
   You might have something like this:
[F] Format a disk
[C] Change directory
[D] Change drive
[L] List files
[Q] Quit to previous menu
   Now you've got to check for specific characters and they
   are not in sequence.
   You might also do something like this:
WHILE INKEY$ > "": WEND
DO
   K$ = UCASE$(INKEY$)
   SELECT CASE K$
      CASE "F", "C", "D", "L", "Q": EXIT DO
   END SELECT
LOOP
   This last method is actually much easier to read and
   understand. Both its method and its purpose are immediately
   clear at a glance.
---
> ] Those who don't learn from the past are... Rats! I forgot...
---
---------------
* Origin: *YOPS ]I[* 8.4 GIG * RA/FD/FE * Milwaukee, WI (1:154/750)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.