Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50141/tutr06.bas
There are 2 other files named tutr06.bas in the archive. Click here to see a list.
00001REM  TUT6
00100LETC=0
00120GOTO150
00130LETC=C+1
00140RETURN
00150PRINT"BACK AGAIN? GOOD. AND I HOPE YOU'RE ALL READY FOR YOUR SIXTH"
00160PRINT"LESSON. BY NOW YOU SHOULD FEEL QUITE COMFORTABLE USING THE"
00170PRINT"'BASIC' LANGUAGE AND THAT'S THE WHOLE IDEA."
00180PRINT
00190PRINT"HERE ARE SOME OF THE TERMS WE HAVE USED IN OUR FIRST FIVE"
00200PRINT"LESSONS. JUST SO WE KNOW WE UNDERSTAND EVERYTHING SO FAR, LET'S"
00210PRINT"CHECK UP A LITTLE BIT. WE'LL LET THE CHOICE SELECTION BE:"
        00220PRINT
00230PRINT"     1=LET    2=END    3=NEW    4=OLD    5=RUN    6=DIM"
00240PRINT"        7=SAVE   8=CONTROL 'O'   9=READ   10=DATA   11=LIST"
00250PRINT"          12=PRINT   13=GO TO   14=BYE   15=UNSAVE"
00260PRINT"             16=INPUT   17=GOODBYE   18=CATLOG"
00270PRINT
00280PRINT"IN A MINUTE, WE'LL HAVE A FEW QUESTIONS ABOUT THESE TERMS SO"
00290PRINT"YOU CAN CHECK ON YOURSELF. BEFORE WE DO THAT, LOOK AT EACH ONE"
00300PRINT"AND SEE IF YOU CAN TELL WHAT IT IS FOR."
00310PRINT
00320PRINT"FOR INSTANCE, TAKE 'GOODBYE'. YOU USE THIS ONE TO SIGN OFF WITH."
   00330PRINT"OR HOW ABOUT 'NEW'? THIS IS THE ONE WE USE WHEN WE WANT TO"
00340PRINT"FORMULATE A PROGRAM NOT ALREADY IN THE COMPUTER'S MEMORY. THEN"
00350PRINT"THERE'S 'RUN' - THIS ONE IS USED TO BEGIN THE EXECUTION OF ANY"
00360PRINT"PROGRAM. HOW MANY OF THE OTHER 15 ARE YOU PRETTY SURE YOU KNOW";
00380INPUTI
00390PRINT
00400PRINT"WELL, HERE'S YOUR CHANCE TO TEST YOURSELF. I AM GOING TO TYPE"
00410PRINT"OUT 10 QUESTIONS. ANSWER EACH ONE BY USING THE NUMBER OF THE"
00420PRINT"CHOICE YOU SELECT. AFTER YOU HAVE TRIED THEM ALL, WE'LL TAKE A"
   00430PRINT"LOOK AT THE ANSWERS AND SEE HOW YOU DID. OK? HERE THEY ARE:"
00440PRINT
00450PRINT"    1. WHICH IS USED TO CALL A PROGRAM FROM THE LIBRARY";
00460INPUTZ
00470IFZ<>4THEN490
00480GOSUB130
00490PRINT"    2. WHICH ONE MUST NEVER BE OMITTED IN A COMPLETED PROGRAM";
00500INPUTY
00510IFY<>2THEN530
00520GOSUB130
00530PRINT"    3. WHICH CAUSES THE COMPUTER TO ALTER NORMAL SEQUENCE";
00540INPUTX
00550IFX<>13THEN570
00560GOSUB130
00570PRINT"    4. WHICH IS A SHORT FORM OF ONE OF THE OTHERS";
00580INPUTW
                                                                    00590IFW<>14THEN610
00600GOSUB130
00610PRINT"    5. WHICH CAUSES THE COMPUTER TO TYPE OUT YOUR PROGRAM";
00620INPUTV
00630IFV<>11THEN650
00640GOSUB130
00650PRINT"    6. WHICH TELLS YOU WHAT PROGRAMS ARE IN THE LIBRARY";
00660INPUTU
00670IFU<>18THEN690
00680GOSUB130
00690PRINT"    7. WHICH STOPS THE TELETYPE FOR DATA ENTRY";
00700INPUTT
00710IFT<>16THEN730
00720GOSUB130
00730PRINT"    8. WHICH IS THE CORRECT ONE TO INTERRUPT THE MACHINE";
00740INPUTS
00750IFS<>8THEN770
00760GOSUB130
00770PRINT"    9. WHICH IS USED TO SHOW AN EQUATION";
                            00780INPUTR
00790IFR<>1THEN810
00800GOSUB130
00810PRINT"   10. WHICH IS NECESSARY BECAUSE OF SUBSCRIPTED VARIABLES";
00820INPUTP
00830IFP<>6THEN850
00840GOSUB130
00850PRINT
00855IFC=10THEN1520
00860PRINT"YOU ANSWERED   ";C;"CORRECTLY. LET'S CHECK YOUR ANSWERS:"
00870PRINT
00880PRINT"QUESTION    SHOULD      YOUR"
00890PRINT" NUMBER       BE       ANSWER"
00900PRINT
00910PRINT"    1          4        ";Z
00920PRINT"    2          2        ";Y
00930PRINT"    3         13        ";X
00940PRINT"    4         14        ";W
                                           00950PRINT"    5         11        ";V
00960PRINT"    6         18        ";U
00970PRINT"    7         16        ";T
00980PRINT"    8          8        ";S
00990PRINT"    9          1        ";R
01000PRINT"   10          6        ";P
01010PRINT
01020IFC>6THEN1150
01030PRINT"YOUR SCORE IS ACTUALLY LESS THAN A PASSING SCORE (7 RIGHT). DO"
01040PRINT"YOU THINK MAYBE YOU OUGHT TO GO BACK AND TRY A PREVIOUS LESSON"
01050PRINT"AGAIN (0=NO, 1=YES)";
01060INPUTD
01065PRINT
01070IFD=1THEN1110
01080IFD=0THEN1130
01090PRINT"YOUR ANSWER DOESN'T MAKE SENSE. LET'S START OVER: ONCE AGAIN,"
       01100GOTO1030
01110PRINT"GOOD IDEA. CALL FOR AN EARLIER LESSON AND I'LL HELP YOU WITH IT."
01120STOP
01130PRINT"WELL, IT'S UP TO YOU, OF COURSE. LET'S CONTINUE. BUT FIRST,"
01140GOTO1190
01150PRINT"RATE YOURSELF THIS WAY: 10 RIGHT - EXCELLENT, 9 RIGHT - GOOD,"
01160PRINT"8 RIGHT - FAIR, AND 7 RIGHT - PASSING."
01170PRINT
01185PRINT"WE'LL CONTINUE WITH OUR LESSON DIRECTLY. BUT BEFORE WE GO ON,"
01190PRINT"LET'S JUST QUICKLY CORRECT ANY QUESTION YOU MISSED. REMEMBER:"
01200PRINT
01210IFZ<>4THEN1320
01220IFY<>2THEN1340
                                                         01230IFX<>13THEN1360
01240IFW<>14THEN1380
01250IFV<>11THEN1400
01260IFU<>18THEN1420
01270IFT<>16THEN1440
01280IFS<>8THEN1460
01290IFR<>1THEN1480
01300IFP<>6THEN1500
01310GOTO1530
01320PRINT"'OLD' CALLS LIBRARY PROGRAMS."
01330GOTO1220
01340PRINT"'END' MUST ALWAYS BE INCLUDED."
01350GOTO1230
01360PRINT"'GO TO' CHANGES EXECUTION SEQUENCE."
01370GOTO1240
01380PRINT"'BYE' IS A SHORT FORM OF 'GOODBYE'."
01390GOTO1250
01400PRINT"'LIST' RESULTS IN YOUR PROGRAM BEING TYPED OUT."
01410GOTO1260
01420PRINT"'CATLOG' LISTS THE LIBRARY PROGRAMS."
                                01430GOTO1270
01440PRINT"'INPUT' STOPS THE TELETYPE FOR DATA ENTRIES."
01450GOTO1280
01460PRINT"'CONTROL O' SHOULD BE USED TO INTERRUPT THE MACHINE."
01470GOTO1290
01480PRINT"'LET' IS USED TO SHOW EQUATIONS."
01490GOTO1300
01500PRINT"'DIM' MUST BE USED IF THERE ARE SUBSCRIPTED VARIABLES."
01510GOTO1530
01520PRINT"GOOD FOR YOU - A PERFECT SCORE."
01530PRINT
01540PRINT"OUR NEW OBJECTIVE WILL BE TO LEARN HOW TO GET THE COMPUTER TO"
01550PRINT"DO THE SAME PROBLEM MANY TIMES WITH DIFFERENT DATA. ITERATIVE"
01560PRINT"INSTRUCTION GROUPS ARE OFTEN REFERRED TO AS 'LOOPS'. IN THEIR"
       01570PRINT"SIMPLEST FORM, THEY CAUSE THE MACHINE TO DO THE PROBLEM OVER"
01580PRINT"AND OVER, USING DIFFERENT NUMERICAL VALUES EACH TIME. "
01590PRINT
01600PRINT"THIS LESSON IS CONTINUED IN THE PROGRAM 'TUTR07' (TUTR03"
01610PRINT"GIVES DIRECTIONS FOR CALLING PROGRAMS). SO LET'S KEEP"
01620PRINT"GOING."
01630	END