11.07.2015 Views

Here - 1000 BiT

Here - 1000 BiT

Here - 1000 BiT

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

INSTRUCTOR NOTES 7 THE LET COMMAND, GLUING STRINGS U■ ■■■■■■■ :*; \^JThe LET command and concatenation are introduced.Concatenation of strings glues short strings together to make long ones.The box model is used to emphasize that LET is a replacement command, not an "equal" ,relationship in the sense used in arithmetic.The box idea nicely separates the concepts "name of the variable" and "value of thevariable." The name is on the label of the box, the value is inside. The contents of the L^box may be removed for use. More exactly, a copy of the contents is made and used whena variable is used; the original contents remain intact. This point is explained. When ^LET puts new contents into a box, the old contents are automatically erased first.Used so far:^jNEW, PRINT, REM, RUN, LIST, INPUT, LETSpecial keys discussed so far:RETURN, CRSR arrows, SHIFT, CLR HOME, CTRL, DEL and the COMMODORE FLAGUv—'^QUESTIONS: {J1. LET puts things into boxes. So does INPUT. How are they different? ^2. If you run this little program10LETA$="HI"20LETB$=A$■ •■ ■■■■■ ■ ■- ^J^Jwhat will be in box A$ at the end? What will be in box B$?■.''.■3. In this program■ • . • u10LETQ$="MOM"what is "MOM" called? What is the name of the string variable in this program? What ,,is the value of the string variable after the program runs?^J4. What is in each box after this program runs?10LETH$="FAT"20 LET K$= "SAUSAGE" ^30 LET P$= H$+K$ ^.44

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

Saved successfully!

Ooh no, something went wrong!