Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-04 - decus/20-0134/xlearn.fcl
There is 1 other file named xlearn.fcl in the archive. Click here to see a list.
ERASE,ALL
C - FOCAL LEARNING PROGRAM
C-FOCAL	v3A(226)-1	1716	24-OCT-73

01.01	X FOCAL(2,2);D 2
01.02	D 3.1
01.03	E 3.1;D 3
01.04	D 4
01.05	D 5.1
01.06	E 5.1;D 5
01.07	D 6.1
01.08	E 6.1;D 6
01.09	D 7.1
01.10	E 2,3,4,5,6,7,8,9,10,1.10
01.11	D 21
01.12	D 22
01.13	D 23.05
01.14	E 23.05;D 23
01.15	E 23.1;D 23
01.16	E 23.2;D 23
01.17	D 24
01.18	D 25
01.19	D 26
01.20	E 20,21,22,23,24,25,26,27,28,29,1.20
01.21	D 31
01.22	D 32
01.23	E 32.1;D 32
01.24	D 33
01.25	D 34
01.26	D 35
01.27	D 36
01.28	D 37
01.29	D 38
01.30	E 38.1;D 38
01.31	E 11,19,31,32,33,34,35,36,37,38,39,1.31
01.40	D 41
01.41	D 42
01.42	E 42.1;D 42
01.43	D 43
01.44	D 44
01.45	D 45
01.46	D 46
01.47	D 47
01.48	D 48

02.10	T %8.04,!!"FOCAL MAY BE USED IN PROGRAM OR";D 9.1;T !;D 9.1
02.20	T " ALLOWS 'DESK CALCULATOR' OPERATION"!;D 9.2;T " IS USEFUL FO
02.30	T "R THIS PURPOSE"!!"THE COMPUTER WILL RECEIVE A COMMAND ON TYP
02.40	T "ING '*'";D 9.3;T !"TYPE 123.456";D 8;E 1.01;Q

03.10	D 9.4;E 1.02;Q
03.20	T !!;D 9.2;T " CAN ALSO BE USED IN CALCULATING.";D 9.3
03.30	T !"TYPE 1+2";D 8;E 1.03;Q

04.10	T !!"'*' REPRESENTS MULTIPLY, '/' DIVIDE AND BRACKETS ARE AVAIL
04.20	T "ABLE";D 9.3;T !"TYPE (3/4-9)/(1.23*2.45+1)";D 8;E 1.04;Q

05.10	D 9.4;E 1.05;Q
05.20	T !!;D 9.2;T " CAN BE USED TO PRINT TEXT";D 9.3
05.30	T !"TYPE ";X FCHR(34);T"MARY HAD A LITTLE LAMB";X FCHR(34)
05.40	D 9.5,8,10;E 1.06;Q

06.10	D 9.4,10;E 1.07;Q
06.20	T !!"TEXT, EXPRESSIONS ETC. MAY ALL BE PLACED AFTER";D 9.2
06.25	T !"SEPARATED BY COMMAS";D 9.3
06.30	T !"TYPE ";X FCHR(34);T"ONE=";X FCHR(34);T",1,";X FCHR(34);T"A=";X FCHR(34);T",3.4/5.6,";X FCHR(34);T"B=";X FCHR(34);T",(9-0.7)/4"
06.40	D 9.5,8.3;E 10.21;D 10;E 1.08;Q

07.10	D 9.4,10;E 1.09;Q
07.20	L C F29B;G

08.20	T !"END ALL COMMANDS WITH THE RETURN KEY 
08.30	T !"TYPE 'GO' TO RESUME THE TUTORIAL"!!

09.10	T " IMMEDIATE MODE
09.20	T " THE 'TYPE' COMMAND
09.30	T !" TRY TYPING THE COMMAND:
09.40	T !!"TRY 2 OR 3 SIMILAR COMMANDS - AGAIN";D 8
09.50	T !"N.B. TYPE DOUBLE QUOTES AROUND THE TEXT

10.10	T "IF YOU MIS-TYPE"!"THE 'RUBOUT' OR 'DEL' KEY DELETES THE PRECED
10.20	T "ING LETTER(S)"!
10.21	T"EACH DELETED LETTER IS ECHOED AS IT IS RUBBED OUT."!

20.10	T !"RESUME THE TUTORIAL WITH 'GO'"!!

21.30	T !!%8.04"A SPECIAL SYMBOL, '!', IS USED WITH";D 29.2;T !"TO STA
21.40	T "RT A NEW LINE"!"TRY";D 29.3;T !"TYPE !"!"THEN TRY";D 29.3
21.50	T !"TYPE !!!!!";D 20;E 1.11;Q

22.10	D 29.4;T " WITH TEXT, EXPRESSIONS & '!'"!"SEPARATED BY ','";D 20;E 1.12;Q

23.05	D 29.9;D 29.3;T !"SET A=43.73";D 28;E 1.13;Q
23.10	T !!"NOW TRY"!"SET A=2+3*4-5.6/7.8";D 28;E 1.14;Q
23.20	D 29.4,20;E 1.15;Q
23.30	T !!"THE '=' SIGN IN";D 29.6;T " DIFFERS FROM AN ALGEBRAIC '='
23.40	T !"TRY";D 29.3;T !"SET A=1";D 28.1;T !"SET A=A+1";D 28;E 1.16;Q

24.10	T !!"SO FAR WE HAVE WORKED IN IMMEDIATE MODE"!"WE PROGRAM WITH
24.20	D 29.8;T "S. TRY";D 29.3;T !"11.12 SET A=1";D 28.1;T !"11.15 TYPE 
24.30	T " A,!"!"A";D 29.8;D 29.7;T " THROUGH THE 'DO' COMMAND"!"AFTER T
24.40	T "YPING THE";D 29.8;T "S ABOVE TRY";D 29.3;T !"DO 11.12";D 28.1
24.50	T !"DO 11.15";D 20;E 1.17;Q

25.10	T !!"NOW TYPE A NEW LINE"!"11.13 SET A=A+1"!"TRY 'DO'ING ALL 3
25.20	T " LINES IN VARIOUS ORDERS";D 20;E 1.18;Q

26.10	T !!"YOU CAN WRITE OUT A LINE THUS - TRY"!"WRITE 11.12";D 28.1
26.20	T !"WRITE 11.13";D 28.1;T !"WRITE 11.15";D 20;E 1.19;Q

27.10	T !!"WRITE 11"!"AND"!"DO 11"!"'WRITE' AND 'DO' ALL '11' LINES

28.10	T !" FOLLOWED BY
28.20	T !"TYPE A";D 20

29.20	T " THE 'TYPE' COMMAND
29.30	T " TYPING:
29.40	T !!"NOW TRY SOME SIMILAR COMMANDS
29.60	T " THE 'SET' COMMAND
29.70	T " MAY BE USED
29.80	T " NUMBERED COMMAND
29.90	T !!;D 29.6;D 29.7;T " TO SET THE VALUE OF A VARIABLE"!"TRY

30.10	T !"RESUME WITH 'GO'"!!

31.30	T %8.04" - TRY THEM";D 30;E 1.21;Q

32.10	T !!;D 39.2;T " HALTS A PROGRAM - TRY IT"!"REENTER FOCAL BY THE 'REENTER' MONITOR COMMAND"!;E 1.22;Q
32.20	T !!"GOTO 11.12"!"WILL CAUSE THE PROGRAM TO TRANSFER TO THE
32.30	T " NUMBERED LINE,"!"CARRY OUT THAT COMMAND & THEN EACH NU
32.40	T "MBERED COMMAND IN TURN"!"TRY IT"!"THEN TRY 'GOTO' WITH EA
32.45	12.01	Q
32.50	T "CH OTHER '11' LINE";D 30;E 1.23;Q

33.10	T !!"TYPE IN"!"11.19 GOTO 11.13"!"NOW TRY"!"WRITE 11"!"& STAR
33.20	T "T WITH"!"GOTO 11.12"!"N.B. YOU MUST HALT BY";D 39.2;T!"RESUME WITH 'REENTER' AND 'GO'"!;E 1.24;Q

34.10	T !!"AN ALTERNATIVE TO 'SET' IS 'ASK' - TRY"!"ASK A"!"FOLLOWED B
34.20	T "Y"!"TYPE A,!"!"TYPE IN A NUMBER AFTER ':'";D 30;E 1.25;Q

35.10	T !!"ERASE 11"!"ERASES ALL '11' LINES -TRY IT"!"THEN TRY
35.20	T !"WRITE 11";D 30;E 1.26;Q

36.10	T !!"ENTER & TRY A PROGRAM (USE '11' LINES) USING ASK & TYPE
36.20	T !"N.B. 'ERASE' MAY BE USED WITH SINGLE LINES";D 30;E 1.27;Q

37.10	T !!"SUBSCRIPTS ARE SHOWN BY BRACKETED NUMBERS"!"AFTER THE VA
37.20	T "RIABLE NAME"!"TRY"!"SET A(1)=30.34"!"&"!"SET A(2)=43.75
37.30	T !"THEN"!"TYPE A(1),!"!"&"!"TYPE A(2),!";D 30;E 1.28;Q

38.10	T !!"SET AND TYPE MORE SUBSCRIPTED VARIABLES";D 30;E 1.29;Q
38.20	T !!"IF (X)LINE 1,LINE 2,LINE 3"!"ACTS AS";D 39.1;T " 1' IF X<0 ,
38.30	D 39.1;T " 2' IF X=0 , OR";D 39.1;T " 3' IF X>0"!"'ASK' PRINTS TE
38.40	T "XT LIKE 'TYPE'"!"'ERASE 11' & ENTER THE FOLLOWING 'LOOPING' PROGRAM ....."
38.50	T !"11.10 ASK ";X FCHR(34);T"NO. OF READINGS";X FCHR(34);T",N"!

39.10	T !"'GOTO LINE
39.20	T " TYPING CONTROL/C TWICE

41.50	T %8.04"11.20 SET I=0"!"11.30 SET I=I+1
41.60	T !"11.40 ASK A(I)"!"11.50 IF (I-N)11.3,11.6,11.3"!"11.60 SET I=0
41.70	T !"11.70 SET I=I+1"!"11.80 TYPE A(I),!"!"11.90 IF (I-N)11.7,11
41.75	12.01	Q
41.80	T ".95,11.7"!"11.95 TYPE ";X FCHR(34);T"OUTPUT FINISHED";X FCHR(34);T",!"!" ";T !!;E 1.40;Q

42.10	T !!"NOW TYPE 'GOTO 11.1'"!!;E 1.41;Q
42.20	T !!"'LOOPING' IS BETTER DONE WITH 'FOR'"!"11.20 FOR I=1,N;A
42.40	T "SK A(I)";D 49.2;T " 11.2 TO 11.5";D 49.3;T " 11.2";D 49.4;E 1.42;Q

43.10	T !!"SIMILARLY"!"11.60 FOR I=1,N;TYPE A(I),!";D 49.2
43.20	T " 11.6 TO 11.9";D 49.3;T " 11.6";D 49.4;E 1.43;Q

44.10	T !!"'FOR I=1,N;-' MEANS FOR I=1 UP TO I=N CARRY OUT ALL COMMANDS
44.20	T " AFTER ';'"!"N.B. A LINE MAY CONTAIN DIFFERENT COMMANDS SE
44.30	T "PARATED BY ';'"!"'FOR' IS USED IN SUMMING - ENTER"!"11.70 SET S=
44.40	T "0;FOR I=1,N;SET S=S+A(I)"!"11.92 TYPE ";X FCHR(34);T"S=";X FCHR(34);T",S"!;D 49.4;E 1.44;Q

45.10	T !!"'TYPE' USES THE LAST FORMAT GIVEN"!"ABOVE IT WAS '%8.04'
45.20	T !"[SPACE FOR 8 DIGITS & 4 DECIMALS]"!"'%' IS FORMAT - TRY
45.30	T !"TYPE %8.04,1,!,%5.02,1,!,%2,1,!,%,1,!
45.40	T !"[N.B. INTEGER & 'E' FORMATS]"!!;E 1.45;Q

46.10	T !!"TRY MORE FORMATS"!!;E 1.46;Q

47.10	T !!"CALCULATE FACTORIAL 30 BY"!"SET M=1;FOR A=1,30;SET M=
47.20	T "M*A"!"THEN"!"TYPE %,M,!"!!;E 1.47;Q

48.10	T !"**TUTORIAL ENDS**"!"READ THE FOCAL MANUAL"!!;E A

49.20	T !"WILL REPLACE LINES
49.30	T !"ERASE THEM & TYPE IN THE NEW
49.40	T !"'WRITE 11' & START AS ABOVE"!!
TYPE "FOCAL LEARNING PROGRAM."!!!"THIS PROGRAM WILL ASSIST YOU TO LEARN HOW TO USE FOCAL"!
TYPE "AS A DESK CALCULATOR AND AS A PROGRAMMING TOOL."!
TYPE "FOCAL WILL LEAD YOU THROUGH A LESSON, IN WHICH YOU WILL"!
TYPE "RECEIVE INSTRUCTIONS, YOU WILL TRY SOME EXAMPLES, AND"!
TYPE "YOU WILL RETURN TO THE INSTRUCTOR BY TYPING 'GO' AND CARRIAGE-RETURN."!!!
TYPE !"TO PROCEED, TYPE 'GO' AND STRIKE THE CARRIAGE-RETURN KEY."!