Here - 1000 BiT

Here - 1000 BiT Here - 1000 BiT

11.07.2015 Views

KINDS OF JUMPSThere are only two ways to jump:ahead or back.Jumping back gives a LOOP.10 PRINT "HI"20 GOTO 10The path through the program is like this:,10 PRINT "HI"20 GOTO 10 >The computer goes around and around in this loop. Press the STOP key to stop.Jumping ahead skips part of the program. Whatever for? We will see later in theIF command.THE STOP KEYThe STOP key is a "life saver." When you are in trouble, press STOP and the computerwill stop running the program and wait for your next command. Your program is stillsafe in memory.If you are in real big trouble, press STOP and at the same time press RESTORE. Thecomputer does a "warm start." Your program is still safe in memory.(The RUN part of the key can be used to load programs from tape. Because a file namecannot be used with the RUN key, it is not often used.)50

A CAN OF SPAGHETTILook at this: 10 REM — SPAGHETTI —,20 GOTO 70,25 PRINT "A",26 GOTO 50,30 PR I NT "S"«31 GOTO 25,40 PRINT "C"41 GOTO 90*50 PRINT "U"• 51 GOTO 40k70PRINT"SPAGH ETTI"V71 GOTO 3090 PRINT "E"95 REM — END —100 PRINT "WHEW!"This is not a good, clear program!It is a "spaghetti" program.Don't write spaghetti programs!Don't jump around too much in your programs.51

KINDS OF JUMPSThere are only two ways to jump:ahead or back.Jumping back gives a LOOP.10 PRINT "HI"20 GOTO 10The path through the program is like this:,10 PRINT "HI"20 GOTO 10 >The computer goes around and around in this loop. Press the STOP key to stop.Jumping ahead skips part of the program. Whatever for? We will see later in theIF command.THE STOP KEYThe STOP key is a "life saver." When you are in trouble, press STOP and the computerwill stop running the program and wait for your next command. Your program is stillsafe in memory.If you are in real big trouble, press STOP and at the same time press RESTORE. Thecomputer does a "warm start." Your program is still safe in memory.(The RUN part of the key can be used to load programs from tape. Because a file namecannot be used with the RUN key, it is not often used.)50

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!