Here - 1000 BiT

Here - 1000 BiT Here - 1000 BiT

11.07.2015 Views

LESSON 15SOME SHORTCUTSA PRINT SHORTCUTInstead of typing PRINT, just type a question mark.Enter10? "HI"LISTThe computer substitutes the word PRINT for the question mark.A LET SHORTCUTThese two lines do the same thing:10LETA=41and10A=41also these two: 20 LET B$="HI" and 20 B$="HI"You can leave out the word LET from the LET statement! The computer knows that youmean LET whenever the line starts with a variable name followed by an "=" sign.88

AN INPUT SHORTCUTInstead of10 PRINT "ENTER YOUR NAME"20 INPUT N$You can do 10 INPUT "ENTER YOUR NAME"; N$Put a semicolon between the message "ENTER YOUR NAME" and the variables.ANOTHER INPUT SHORTCUTYou can INPUT several things in one command. Put commas between the variables.Run20 INPUT "LOCATION"; X,YYou see LOCATION? on the screen.You enter two numbers with a comma between them.LOCATION? 5,6Another example30 INPUT "MONTH, DAY, YEAR";M$,D,YAfter the "?" typeAPRIL.29,1983ERROR MESSAGE ININPUTIf you do not enter enough answers, the computer asks "It". Then you should enter therest.Example:30 INPUT "MONTH, DAY, YEAR";M$,D,Y? MAY, 1?? 1984If you enter too many answers, the computer replies?EXTRA IGNOREDand goes on with the program.Example:55 INPUT'SLEEPY? ";A$? NO.FINE?EXTRA IGNORED89

AN INPUT SHORTCUTInstead of10 PRINT "ENTER YOUR NAME"20 INPUT N$You can do 10 INPUT "ENTER YOUR NAME"; N$Put a semicolon between the message "ENTER YOUR NAME" and the variables.ANOTHER INPUT SHORTCUTYou can INPUT several things in one command. Put commas between the variables.Run20 INPUT "LOCATION"; X,YYou see LOCATION? on the screen.You enter two numbers with a comma between them.LOCATION? 5,6Another example30 INPUT "MONTH, DAY, YEAR";M$,D,YAfter the "?" typeAPRIL.29,1983ERROR MESSAGE ININPUTIf you do not enter enough answers, the computer asks "It". Then you should enter therest.Example:30 INPUT "MONTH, DAY, YEAR";M$,D,Y? MAY, 1?? 1984If you enter too many answers, the computer replies?EXTRA IGNOREDand goes on with the program.Example:55 INPUT'SLEEPY? ";A$? NO.FINE?EXTRA IGNORED89

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

Saved successfully!

Ooh no, something went wrong!