BBS: Inland Empire Archive Date: 02-15-93 (00:44) Number: 383 From: LEE HERRON Refer#: NONE To: ALL Recvd: NO Subj: GETNPUT.BAS 3/3 Conf: (2) Quik_Bas
'BEGIN PART III
'======= (* Checking k$ for <backspace> *) =================================
CASE 8 ' ---[* Backspace
IF c = LEN(p$) AND once <> 1 THEN
MID$(p$, LEN(p$), 1) = " "
once = 1
ELSE
d = -1
dflag = 1
END IF
CASE 32 ' ---[* Space Bar
IF ns = 0 THEN MID$(p$, c) = " ": d = 1 ELSE BEEP
CASE 48 TO 57
MID$(p$, c) = k$: d = 1
CASE 33 TO 47, 58 TO 122: ' ---[* Anything from chr$ 32 thru 122
IF a# <> 2 THEN
MID$(p$, c) = k$: d = 1
ELSE
BEEP: nt = 1
END IF
' ---[* Modifying input based on Flags
IF nt <> 1 THEN
IF au = 1 THEN MID$(p$, c) = UCASE$(k$)
IF uc = 1 THEN
IF c = 1 THEN
MID$(p$, 1) = UCASE$(MID$(p$, 1, 1))
ELSE
IF MID$(d$, c - 1, 1) = st$ AND MID$(p$, c - 1, 1) = st$ THEN
MID$(p$, c, 1) = UCASE$(MID$(p$, c, 1))
ELSE MID$(p$, c, 1) = LCASE$(MID$(p$, c, 1))
END IF
END IF
END IF
d = 1
END IF
CASE ELSE
END SELECT
GOTO TGI
toutput:
dp$ = p$:
END SUB
' END PART III
'----------------8<-----------------------8<-------------------------------
Lee
--- GoldED 2.40
* Origin: NightFlight BBS [16.8 HST-DS] (1:3612/130)

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