[Coco] [Color Computer] Hello everyone!

Phill Harvey-Smith afra at aurigae.demon.co.uk
Sun May 10 00:21:56 EDT 2009


Bob Devries wrote:
> The INPUT command can also be used with a prompt, like this:
> 
> 10 INPUT "TYPE A NUMBER "; X
> 20 PRINT "YOU TYPED "; X
> 
> The INPUT command can also accept a string of letters (or combination 
> letters and numbers), like this:
> 
> 10 INPUT "TYPE YOUR NAME: "; A$
> 20 PRINT "HELLO "; A$

Is should be added that the above will always print a ? as the last 
character as the prompt, if you want to supress this you can use the 
LINE statement before then INPUT statement, to see the difference run 
the following :-

10 INPUT "TYPE YOUR NAME: "; A$
20 LINE INPUT "TYPE YOUR NAME: "; A$

The output should be :-
TYPE YOUR NAME:?
TYPE YOUR NAME:

The first will be from line 10, the second from line 20.

Cheers.

Phill.

-- 
Phill Harvey-Smith, Programmer, Hardware hacker, and general eccentric !

"You can twist perceptions, but reality won't budge" -- Rush.



More information about the Coco mailing list