BBS: Inland Empire Archive Date: 02-10-93 (12:55) Number: 317 From: CORIDON HENSHAW Refer#: NONE To: ALL Recvd: NO Subj: ELBROWSE.BAS 5/5 Conf: (2) Quik_Bas
Hello All! ===Chop=== CASE CHR$(0) + "G" 'Home EditPos = 1 LOCATE Row, Col + EditPos, Cursor CASE CHR$(0) + "O" 'End EditPos = MaxLen LOCATE Row, Col + EditPos, Cursor CASE CHR$(27) 'ESC ExitFlag = 1 CASE CHR$(13) 'Enter ExitFlag = 2 CASE CHR$(8) 'BKSPC IF InputLength > 0 THEN InputLength = InputLength - 1 EditPos = EditPos - 1 InputBuffer$ = LEFT$(InputBuffer$, InputLength) LOCATE Row, Col, 0 PRINT InputBuffer$ + STRING$(MaxLen - _ InputLength, " "); LOCATE Row, Col + InputLength, Cursor ELSE BEEP END IF CASE ELSE IF LEN(Ikey$) = 1 AND InputLength <> MaxLen THEN InputLength = InputLength + 1 EditPos = EditPos + 1 IF EditPos < InputLength THEN MID$(InputBuffer$, EditPos, 1) = Ikey$ ELSE InputBuffer$ = InputBuffer$ + Ikey$ END IF LOCATE Row, Col, Cursor PRINT InputBuffer$ + STRING$(MaxLen - _ InputLength, " "); LOCATE Row, Col + EditPos, Cursor ELSE BEEP END IF END SELECT LOOP UNTIL ExitFlag > 0 IF ExitFlag = 2 THEN TextInput$ = LEFT$(InputBuffer$, InputLength) END IF LOCATE , , 0 END FUNCTION SUB WrapString (Text$) DIM TextBuffer(1 TO 255) AS STRING TextBuffer(1) = Text$ FOR X = 1 TO NoteParse(1, TextBuffer()) PRINT TextBuffer(X) NEXT END SUB ===Chop=== Some lines may wrap in transit. Coridon Henshaw \ Sirrus Software --- GEcho 1.00 * Origin: TCS Concordia - Mail Only - Toronto, Ontario (1:250/820)
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