Re: Multi-Tasking

 BBS: Inland Empire Archive
Date: 03-03-92 (23:58)             Number: 162
From: KEVIN NEWELL                 Refer#: NONE
  To: TRENT SHIRLEY                 Recvd: NO  
Subj: Re: Multi-Tasking              Conf: (11) Modula-2

Hello Trent! In a msg of <29 Feb 92>, Trent Shirley writes to Matt Hart: TS> Back to Quick Basic though. Im writing a program that allows the user TS> to enter a line of text data, and storing that data in a $ variable. TS> Funny thing is, if the user enters a , the entire line aborts with the TS> message Redo from start. It was my impression that characters assigned TS> to a string variable were ignored as to any special purpose that TS> character normally had. Any ideas on this? It probally is not the best way, but why not use the INKEY$?? STORE$="" 'First "zero" out your variable DO A$ = INKEY$ ' Get the keyboard input IF A$ = CHR$(13) THEN ' Test for Return EXIT DO ' if so exit loop ELSE STORE$ = STORE$ + A$ ' if not, add the keypress to variable PRINT A$; ' and echo the keypress to the screen END IF LOOP LOOP Although untested, (I'm a little rusty so kludgy also!) it should work. Kevin --- GoldED 2.31p * Origin: Treasure Island BBS in Pekin, Il. {309} 346-2074 (FidoNet 1:232/200)
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