Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50141/tutr09.bas
There are 2 other files named tutr09.bas in the archive. Click here to see a list.
00001REM    TUT9
00100PRINT"WELCOME TO LESSON 9.  WE BRIEFLY INVESTIGATED THE TAPE UNIT LAST"
00110PRINT"LESSON. HAVE YOU TRIED USING TAPE (0=NO, 1=YES) ";
00120INPUTQ
00130PRINT
00140IFQ=0THEN190
00150IFQ=1THEN280
00160PRINT"YOU WEREN'T PAYING ATTENTION - YOU HAVE TO TYPE '0' OR '1' - SO:"
00170PRINT"HAVE YOU HAD THE CHANCE YET ";
00180GOTO120
00190PRINT"WELL, THAT SHOULD BE NEXT. DID YOU UNDERSTAND THE EXPLANATION"
00200PRINT"IN LESSON 8? I HOPE SO, BUT ACTUALLY TRYING IT SHOULD HELP YOU."
   00210PRINT"WOULD YOU LIKE TO TRY A SHORT TAPE NOW (0=NO, 1=YES) ";
00220INPUTR
00230PRINT
00240IFR=0THEN400
00250IFR=1THEN1130
00260PRINT"YOU CAN'T ANSWER A 'YES OR NO' QUESTION THAT WAY. ONCE MORE -"
00270GOTO210
00280PRINT"AND WERE YOU SUCCESSFUL (0=NO, 1=YES) ";
00290INPUTB
00300PRINT
00310IFB=0THEN350
00320IFB=1THEN380
00330PRINT"..........PLEASE TYPE '0' FOR 'NO' OR '1' FOR 'YES'..WHICH";
00340GOTO290
00350PRINT"IT MAY TAKE SOME PRACTICE BEFORE YOU GET PROFICIENT AT IT. YOU"
00360PRINT"PROBABLY SHOULD TRY AGAIN WHILE IT'S STILL FRESH IN YOUR MIND."
   00370GOTO210
00380PRINT"THAT'S THE WAY TO DO IT. NOW I'D SAY IT WAS TIME WE WENT BACK"
00390GOTO410
00400PRINT"O.K. THEN - WE'LL FORGET ABOUT THE TAPE FOR AWHILE AND GO BACK"
00410PRINT"TO WRITING PROGRAMS. WE SAW THAT 'SQR' ALWAYS MEANS 'FIND THE"
00420PRINT"SQUARE ROOT'. WE REFER TO SUCH AN OPERATION AS A 'FUNCTION'."
00430PRINT
00440PRINT"THERE ARE MANY 'STANDARD' OR PREDEFINED FUNCTIONS, WHICH HAVE A"
00450PRINT"SET MEANING. 'SQR' IS ONE; 'LOG' IS ANOTHER. THIS ONE REFERS TO"
00460PRINT"NUMBERS FOUND IN A TABLE OF LOGARITHMS. LOOK OVER THE FOLLOWING:"
   00470PRINT
00480PRINT"     (1) TAN     (2) TRA     (3) ADV     (4) ABS"
00490PRINT
00500PRINT"     (5) COS     (6) PAC     (7) MON     (8) SIN"
00510PRINT
00520PRINT"FOUR OF THEM ARE STANDARD FUNCTIONS; FOUR ARE NOT. CAN YOU PICK"
00530PRINT"ONE OUT THAT IS? TYPE IN ITS NUMBER ONLY. WHAT WOULD YOU SAY";
00540INPUTA
00550PRINT
00560IFA=1THEN620
00570IFA=4THEN620
00580IFA=5THEN620
00590IFA=8THEN620
00600PRINT"YOU DIDN'T PICK ONE OF THEM THAT TIME. TRY ONCE MORE. WHICH";
00610GOTO540
00620PRINT"THIS IS ONE OF THEM. THREE ARE TRIGONOMETRIC FUNCTIONS: 'TAN'"
        00630PRINT"MEANS 'TANGENT', 'SIN' MEANS 'SINE', AND 'COS' MEANS 'COSINE'."
00640PRINT"ONE ('ABS') MEANS TO USE THE POSITIVE VALUE FOR WHATEVER IS"
00650PRINT"BEING CONSIDERED. THIS IS THE 'ABSOLUTE VALUE' - OFTEN REQUIRED."
00660PRINT
00670PRINT"EACH FUNCTION IS FOLLOWED BY AN EXPRESSION IN PARENTHESES, KNOWN"
00680PRINT"AS THE 'ARGUMENT'; IT IS WHAT THE FUNCTION OPERATES ON. EXAMPLE:"
00690PRINT"'ABS(Y)' MEANS 'Y' IS TO BE MADE POSITIVE REGARDLESS OF SIGN, OR"
00700PRINT"ITS 'ABSOLUTE VALUE' IS TO BE USED. HERE 'Y' IS THE ARGUMENT."
        00710PRINT
00720PRINT"WE HAVE MENTIONED 6 STANDARD FUNCTIONS. 'BASIC' HAS 4 OTHERS"
00730PRINT"AVAILABLE TO THE USER. THEY ARE:"
00740PRINT
00750PRINT"     (1) ATN(U)     (2) EXP(U)     (3) INT(U)     (4) RND(U)"
00760PRINT
00770PRINT"HERE THE 'U' SIMPLY REPRESENTS THE ARGUMENT. ONE OF THE ABOVE IS"
00780PRINT"FOR TAKING ONLY THE WHOLE NUMBER PART OF A DECIMAL NUMBER. WHICH"
00790PRINT"DO YOU THINK THIS ONE MIGHT BE (TYPE NUMBER) ";
00800INPUTW
00810PRINT
00820IFW=3THEN850
00830PRINT"NO, IT'S 'INT(U)' BECAUSE 'INT' STANDS FOR 'INTEGER'. WHICH DO"
00840GOTO860
00850PRINT"THAT'S RIGHT - 'INT' MEANS 'INTEGER'. TRY ANOTHER: WHICH ONE DO"
00860PRINT"YOU SUPPOSE IS USED TO GENERATE NUMBERS AT RANDOM";
00870INPUTR
00880PRINT
00890IFR=4THEN920
00900PRINT"YOU NEED ANOTHER GUESS. LOOK AT THE LETTER COMBINATIONS. TRY..";
00910GOTO870
00920PRINT"GOOD. ALSO, 'ATN' MEANS 'ARCTANGENT', A TRIGONOMETRIC FUNCTION,"
00930PRINT"AND 'EXP' MEANS 'EXPONENTIAL', WHICH IS THE ANTILOG FUNCTION."
00940PRINT"IF YOU USE A TRIGONOMETRIC FUNCTION, PLEASE NOTE:  THEY INVOLVE"
00950PRINT"RADIANS, NOT DEGREES. ALSO, THE TWO LOGARITHMIC FUNCTIONS ARE"
        00960PRINT"BASED ON THE 'NATURAL' LOGARITHMS - NOT 'COMMON' LOGS."
00970PRINT
00980PRINT"TYPE CHOICE NUMBER: WOULD YOU LIKE PRACTICE USING: (1) A 'TRIG'"
00990PRINT"FUNCTION? (2) A 'LOG' FUNCTION? (3) ANOTHER STANDARD FUNCTION?"
00992PRINT"OR (4) NO STANDARD FUNCTION?  WHATS YOUR PREFERENCE";
00994INPUTZ1
00996IFZ1=1THEN1010
00997IFZ1=2THEN1010
00998IFZ1=3THEN1010
00999IFZ1=4THEN1020
01000PRINT
01003PRINT"I DO NOT UNDERSTAND YOUR CHOICE.  PLEASE RETYPE.";
01004GOTO994
01010PRINT
01014PRINT"GOOD. CALL IN 'TUTR11*' AND TYPE"Z1"AS YOUR FIRST CHOICE"
            01015STOP
01020PRINT"GOOD. CALL IN 'TUTR12*' AND PROCEED."
01025STOP
01130PRINT"THATS FINE. WE'LL USE THE PROGRAM CALLED 'TUTR10*'FOR THIS"
01132PRINT"PURPOSE.  CALL IT IN FROM THE LIBRARY, AND AFTER YOU HAVE TYPED"
01134PRINT"'RUN' I'LL GIVE YOU SPECIFIC STEP-BY-STEP DIRECTIONS ON HOW TO"
01136PRINT"PROCEED. AFTER YOU HAVE HAD A CHANCE TO TRY IT, WE CAN DISCUSS"
01138PRINT"THE RESULTS IN THIS PROGRAM WHEN YOU CALL IT BACK IN. SO..."
01140PRINT"DO A TAPE WITH 'TUTR10*', AND I'LL BE WAITING FOR YOU."
01142STOP
                                                                   09999END