BBS: Inland Empire Archive Date: 04-02-93 (23:01) Number: 331 From: VICTOR YIU Refer#: NONE To: ALL Recvd: NO Subj: PostIt! 6.0 8/16 Conf: (2) Quik_Bas
'>>> Start of page 8.
END SUB
' Yep, the same one I released, except stripped of comments and
' some features. -VY
FUNCTION GetInput$ (Prompt$, MaxLen)
Null$ = CHR$(0): SpaceBar$ = " "
Insrt$ = Null$ + "R": Delete$ = Null$ + "S"
LeftK$ = Null$ + "K": RightK$ = Null$ + "M"
Home$ = Null$ + "G": End$ = Null$ + "O"
IF MaxLen < 1 THEN MaxLen = 80 - LEN(Prompt$) - POS(0)
COLOR 14
PRINT Prompt$;
StartX = POS(0): Cursor = 1
Insrt = True
COLOR 7
DO
IF Updt THEN
LOCATE , StartX, 0
PRINT OutS$; SpaceBar$;
Updt = False
END IF
LOCATE , Cursor + StartX - 1, 1, (NOT Insrt) * -7, 16
DO: I$ = INKEY$
LOOP UNTIL LEN(I$)
IF LEN(I$) = 1 THEN
Updt = True
SELECT CASE ASC(I$)
CASE IS >= 32
IF (NOT Insrt) OR (LEN(OutS$) < MaxLen) THEN
IF Cursor > 0 THEN
OutS$ = LEFT$(OutS$, Cursor - 1) + I$ +_
MID$(OutS$, Cursor - (NOT Insrt))
ELSE
OutS$ = I$
END IF
Cursor = Cursor + 1
ELSE
Updt = False
END IF
CASE 8
IF LEN(OutS$) AND (Cursor > 1) THEN
OutS$ = LEFT$(OutS$, Cursor - 2) + MID$(OutS$,_
Cursor)
Cursor = Cursor - 1
ELSE
Updt = False
END IF
CASE 13
EXIT DO
CASE 27
IF LEN(OutS$) > 0 THEN
LOCATE , StartX, 0
PRINT SPACE$(LEN(OutS$) + 1);
OutS$ = ""
Cursor = 1
Updt = False
ELSE
EXIT DO
END IF
END SELECT
ELSE ' extended ASCII code
SELECT CASE I$
CASE LeftK$
IF Cursor > 1 THEN Cursor = Cursor - 1
CASE RightK$
IF Cursor < LEN(OutS$) + 1 THEN Cursor = Cursor + 1
CASE Delete$
IF LEN(OutS$) > 0 AND (Cursor < LEN(OutS$)) THEN
OutS$ = LEFT$(OutS$, Cursor - 1) + MID$(OutS$,_
Cursor + 1)
Updt = True
END IF
CASE Home$
'>>> Continued on page 9
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)

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