11.07.2015 Views

Here - 1000 BiT

Here - 1000 BiT

Here - 1000 BiT

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

n INSTRUCTOR NOTES 15 SOME SHORTCUTSn 1. ? used for PRINT^ 2. LET omission3. : used between statements on a lineO 4. INPUT used with a message5. INPUT error messages^ 6. LIST X-Y lists specify sections of program7. THEN 33 instead of THEN GOTO 33^ 8. commands compared to statementsHaving reached RND and the saving of programs on tape, the sprint is over. All theC*\ elements are in place for the student to write substantial programs.^ The colon is used to shorten and clarify programs by putting several statements on a^ line. A line should contain statements which have something in common.^ The colon allows one to put a little "subroutine" consisting of several statements after anIF. This makes using a GOTO unnecessary for reaching the extended segment of aO program. A shorter and much less cluttered program results. So the colon becomes apowerful and nontrivial means of improving the clarity of the program.^ The colon can mess up a program, too. Be careful about adding other statements onto a" GOTO, a REM or an IF line.OA question mark is always printed on the screen by INPUT. So an INPUT messageshould not end with a question mark.n^QUESTIONS:r^ 1. What shortcut does the "?" give?O 2. How can you tell that the word LET is missing from a LET command?^* 3. An INPUT command has a message in quotation marks. What punctuation mark must^follow the message quotes?(-} 4. Why is it sometimes good to put two statements on the same line, separated by a colon?^ 5. What is wrong with each of these lines?^ 10 REM BEGINNING: GOTO <strong>1000</strong>^10GOTO50:S$="FAST"^ 6. If the computer prints "??" after you answer an input, what does it mean?87

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

Saved successfully!

Ooh no, something went wrong!