[Coco] [Color Computer] Hello everyone!

Bob Devries devries.bob at gmail.com
Sun May 10 00:09:25 EDT 2009


The FOR command is like a counter. It is used with the TO and NEXT codes. 
Here's an example:

10 FOR X = 1 TO 10:PRINT X: NEXT X

The TO word must be on the same line as the FOR, but the NEXT word may be on 
another line in the programme. So you could have this also:

10 FOR X = 1 TO 10
20 PRINT X
30 NEXT X

The "X" used here is just a name for a memory location (also known as a 
VARIABLE), to be used to temporarily store the counter value.

The INPUT command takes information from the KEYBOARD (or other input 
devices such as cassette or disk files), and places it in the variable 
specified, like this:

10 PRINT "TYPE A NUMBER ";
20 INPUT X
30 PRINT "YOU TYPED: "; X

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$

Hope that helps.

--
Regards, Bob Devries, Dalby, Queensland, Australia

Isaiah 50:4 The sovereign Lord has given me
the capacity to be his spokesman,
so that I know how to help the weary.

website: http://www.home.gil.com.au/~bdevasl
my blog: http://bdevries.invigorated.org/

----- Original Message ----- 
From: "vacuumboy1" <vacuumboy1 at yahoo.com>
To: <ColorComputer at yahoogroups.com>
Sent: Sunday, May 10, 2009 11:19 AM
Subject: [Coco] [Color Computer] Hello everyone!


> Ive JUST purchased a WORKING tandy coco III for 4.00 at the thrift store 
> today! Me and my mother have been programmin' on it all day. We just LOVE 
> it! But, I need some help. Ive read the commmands and their syntax, but to 
> me, it dosnt make sense. Come someone please explain in simple terms the 
> commands Input and FOR. We don't know how to write them correctly. Any 
> help would be greatly appreciated.
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco 




More information about the Coco mailing list