CND-DET routines 8/8

 BBS: Inland Empire Archive
Date: 03-25-93 (15:37)             Number: 293
From: DIRK THEURER                 Refer#: NONE
  To: ALL                           Recvd: NO  
Subj: CND-DET routines 8/8           Conf: (2) Quik_Bas
'
' CND-DET routines (part 8)
'
    '
    ' see if anything in keyboard
    '
    i$ = INKEY$
    SELECT CASE LEN(i$)
      CASE 0
        '
        ' no character
        '
      CASE 1
        SELECT CASE ASC(UCASE$(i$))
          CASE 81 ' Q uit
            GetCNDNumber% = 2
            FOR i = 1 TO 500: NEXT i
            FOSSILFlush
            EXIT FUNCTION
          CASE ELSE
        END SELECT
      CASE 2
        SELECT CASE ASC(RIGHT$(i$, 1))
          CASE 72 ' up arrow
            FOR i = 1 TO 500: NEXT i
            FOSSILFlush
            GetCNDNumber% = 72
            EXIT FUNCTION
          CASE 80 ' down arrow
            FOR i = 1 TO 500: NEXT i
            FOSSILFlush
            GetCNDNumber% = 80
            EXIT FUNCTION
          CASE 71 ' Home
            FOR i = 1 TO 500: NEXT i
            FOSSILFlush
            GetCNDNumber% = 71
            EXIT FUNCTION
          CASE 79 ' End
            FOR i = 1 TO 500: NEXT i
            FOSSILFlush
            GetCNDNumber% = 79
            EXIT FUNCTION
          CASE 73 ' PgUp
            FOR i = 1 TO 500: NEXT i
            FOSSILFlush
            GetCNDNumber% = 73
            EXIT FUNCTION
          CASE 81 ' PgDn
            FOR i = 1 TO 500: NEXT i
            FOSSILFlush
            GetCNDNumber% = 81
            EXIT FUNCTION
          CASE ELSE
        END SELECT
      CASE ELSE
        '
        ' shouldn't be any such case!
        '
    END SELECT

  LOOP
  '
  ' end of GetCNDNumber%
  '
END FUNCTION
,
,--------8<-------------------- snip here -------------------->8--------

Use and ENJOY!

Dirk



---
 * Origin: RAVE * Burnaby, BC (1:153/810)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET