String INPUT Hints

Authors

Publication

Pub Details

Date

Pages

See all articles from The RAMTOP Nov 1985

There another use of the keyword “LINE” beside starting a program at that line when saving a program. If the word “LINE” is used with a string “INPUT”, the input prompt is given without the usual quotation marks. Try this program:

10 INPUT LINE a$
20 PRINT a$

The prompt for a$ is just the “L” cursor.

Since there are no quotation marks, you can’t move the cursor to the left of the first quotation mark and enter “STOP”. You can only stop the input by entering capshift “6”.

Supposed you want to print a string variable within an INPUT print line. By enclosing the string variable within parenthesis, the variable value of the string will be printed. Try this:

10 INPUT "Enter your name";LINE n$
20 INPUT "Enter your age ";(n$);a$

You will see that the second line prints the name you entered in the first line, and enters the age in a$.

Products

 

Downloadable Media

 

Image Gallery

Scroll to Top