Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50333/check.fcl
There are no other files named check.fcl in the archive.
C-FOCAL	V1B(122)-1	1444	28-JUN-74

01.01	D 22.3;D 22.3;D 22.1;T !"**************  CHECK BALANCING PROGRAM  BY MIKE MITCHELL  *************";D 22.1;D 22.3
01.02	E
01.30	T !!"******** CHECK BALANCER PROGRAM *********"!!;A "DO YOU WANT DIRECTIONS? (Y=YES,CR=NO)",DIR;I (DIR-25)1.42,1.31,1.42;
01.31	T !!"ENTER THE PREVIOUS BALANCE WHEN IT ASKS FOR IT"!
01.35	T !"ENTER DEPOSITS AS POSITIVE NUMBERS  "!;T !"(DON'T INCLUDE THE '+' SIGN..)"
01.36	T !"ENTER CHECKS AS NEGATIVE NUMBERS "!
01.37	T !"HIT CARRIAGE RETURN FOR A SUMMARY "!
01.38	T !"INPUTTING A NEGATIVE CHECK NUMBER WILL LET YOU RE-ENTER"
01.39	T !" THAT ENTRY."!
01.42	A !!"IS EXTENDED SUMMARY DESIRED? (Y=YES)",EXT;I (EXT-25)1.45,1.43,1.45
01.43	I (DIR-25)1.45,1.44,1.45;C DIRECTIONS FOR SUMMARY?
01.44	D 23
01.45	S DT0T=0;S CTOT=0
01.46	S L=0;S TYPE(L)=0
01.49	A !!"DO YOU WANT A QUICK SUMMARY? (Y=YES)",QCK;D 22.3
01.50	S J=0;S K=0
01.60	S CK=0;S DP=0

02.01	A "ENTER YOUR PREVIOUS  BALANCE........",PBAL
02.05	S BAL=PBAL
02.10	A ENTRY;S L=L+1;I (ENTRY)5.05,8.1,6.05

05.02	C TYPE(L) TELLS IF A CK OR DEP (TYPE=1 MEANS CHECK)
05.03	CK IS TOTAL NUMBER OF CHECKS WRITTEN
05.04	C CH(J) IS CHECK AMOUNT,NUM(J) IS CHECK NUMBER
05.05	C CTOT IS CHECK TOTAL
05.07	S CTOT=CTOT+ENTRY
05.08	S CH(J)=ENTRY;S TYPE(L)=1;S NO(L)=J;D 20.1
05.09	A !"    CHECK #?  ",NUM(J);T !;I NUM(J)5.2;S J=J+1
05.10	S CK=CK+1;G 7.1
05.20	S L=L-1;G 2.1
05.30	C THIS HAPPENS WHEN WE INPUT A NEGATIVE CHECK NUMBER

06.01	C DEPOSITS ARE HANDLED HERE (TYPE=0).
06.05	S DE(K)=ENTRY
06.06	S DTOT=DTOT+ENTRY
06.07	S NO(L)=K
06.08	D 20.2
06.09	S K=K+1;S TYPE(L)=0;
06.10	S DP=DP+1;

07.10	S BAL=BAL+ENTRY
07.20	G 2.1

08.10	T !!!!
08.11	D 22.3;T !"--------------------------  SUMMARY  ------------------------------"!!
08.12	T %6.02
08.20	T !"OLD BALANCE    = ",PBAL
08.25	T !!"NEW BALANCE IS = ",BAL
08.26	T %4.0
08.30	T !!"NUMBER OF CHECKS WRITTEN WAS ",CK
08.40	T !!"--- ENTRY ------------CHECK #---------AMOUNT------"!
08.41	T !
08.50	F H=0,J-1;T %4.0;T H;T "              ";T NUM(H);T "            ";T %6.02;T CH(H);T !
08.51	T !!"TOTAL AMOUNT OF CHECKS WAS",CTOT;D 22.3
08.60	T !!"THE DEPOSITS THAT WERE MADE ARE:"!!
08.61	T !"--- ENTRY ------------------- AMOUNT --------"!;F H=0,K-1;T %4.0;T H;T "                        ";T %6.02;T DE(H)!
08.64	T !!"TOTAL AMOUNT OF DEPOSITS WRITTEN WAS ",DTOT;D 22.3
08.65	I (QCK-25)8.69,9.19;
08.69	D 22.3
08.70	T !"PLEASE VERIFY THE ABOVE:"!
08.75	A !"ARE ALL CHECKS CORRECT? (Y=YES,CR=NO)",ANS;
08.76	I (ANS-25)8.8,8.9;
08.80	A !"WHICH ENTRY IS WRONG?",ANS;A !"WHAT SHOULD THE CHECK NUMBER BE?",ANO;A !"WHAT SHOULD THE AMOUNT BE?",AMO
08.81	S CTOT=CTOT-CH(ANS)+AMO
08.85	S NUM(ANS)=ANO;S CH(ANS)=AMO;A !"ANY MORE? (Y 0R CR)",ANS;I (ANS-25)8.4,8.8,8.4
08.90	A !!"ARE ALL DEPOSITS CORRECT? (Y=YES,CR=NO)",ANS;
08.92	I (ANS-25)8.93,9.01;
08.93	A !"WHICH ENTRY IS WRONG?",ANS;A !"WHAT SHOULD THE AMOUNT OF DEPOSIT BE?",AMO
08.94	S DTOT=DTOT-DE(ANS)+AMO
08.95	S DE(ANS)=AMO;A !"ANY MORE? (Y OR CR)",ANS;I (ANS-25)8.6,8.8,8.6

09.01	D 22.3
09.02	S TBAL=PBAL;D 22.2;D 22.3
09.10	T !!"YOUR CHECKBOOK SHOULD LOOK LIKE THIS...."!!
09.11	T !!"CHECK NO.    DATE          AMOUNT OF CHECK       DEPOSIT        BALANCE"!!
09.12	D 22.1;T %8.02
09.13	T !!!!"                                                            ",PBAL!!
09.15	S N=L;S L=1
09.17	I (N-L)9.18,9.18,9.2
09.18	T !!"NEW BALANCE =",TBAL;D 22.3
09.19	I (EXT-25)9.25,28.1,9.25
09.20	I (TYPE(L))21.1,10.01,9.4
09.25	T !!!!"--------- END OF SUMMARY-----------"!!!;D 22.1;D 22.1;D 22.3;Q
09.40	S TBAL=TBAL+CH(NO(L));
09.41	T %4.0
09.50	T !,NUM(NO(L));
09.60	T "       ";
09.61	T %2.0
09.65	T MON(NO(L));
09.75	T DAY(NO(L));
09.80	T "      ";
09.81	T %6.02
09.85	T CH(NO(L));
09.86	T "                        "
09.87	T %8.02
09.88	T TBAL,!!
09.90	S L=L+1;G 9.17

10.01	C
10.05	S TBAL=TBAL+DE(NO(L))
10.10	C COMES HERE IF IT IS A DEPOSIT
10.13	T %2.0
10.15	T !"             ",MO(NO(L));
10.25	T DA(NO(L));
10.30	T "          ";
10.31	T %8.02;T "    "
10.35	T "          ";
10.40	T DE(NO(L))
10.45	T "    ",TBAL
10.46	T !!
10.50	S L=L+1;G 9.17

20.10	A "    DATE....MONTH?  ",MON(J);A "    DAY? ",DAY(J);T !;I (31-DAY(J))20.1;G 20.11
20.11	I (EXT-25)20.12,25.01;R
20.12	R
20.20	A "    DATE....MONTH?  ",MO(K);A "    DAY? ",DA(K);T !!;I (31-DA(K))20.2;R

21.10	T "ERROR.......HALT";Q

22.10	T "************************************************************************"
22.20	T"------------------------------------------------------------------"
22.30	T !!!!

23.01	D 22.3
23.10	T !"AN EXTENDED SUMMARY WILL ALLOW YOU TO CATEGORIZE YOUR EXPENSES."!
23.15	T !"WHEN INPUTTING A CHECK, IT WILL ALSO ASK FOR THE 'TYPE'"
23.20	T !"OF EXPENDITURE.  POSSIBLE TYPES ARE:";D 22.3
23.30	T !"AUTO(A), CASH(C), DOCTOR(D),ELECTRICITY(E), FOOD(F),GAS(G)"!
23.40	T !"HORSE(H),INSURANCE(I),JUNK(J),MOTORCYCLE(M),OIL(O),REGISTRY(R)"!
23.50	T !"SAVINGS(S),TELEPHONE(T),XTRAS(X)"!
23.51	T !!"SIMPLY INSERT THE LETTER OF THE TYPE WHEN IT ASKS FOR IT"
23.55	T !"TO UPDATE EACH CATEGORY.."!;D 22.3

25.01	A "    TYPE?",ETY;T !!;I (ETY-13)26.07,27.13,26.2;C USE BIN SEARCH 

26.01	I (ETY-1)27.05,27.01;
26.02	I (ETY-2)26.01,27.02,27.03;C A?
26.03	I (ETY-3)26.02,27.03,27.04
26.05	I (ETY-5)26.03,27.05,27.06;C E?
26.07	I (ETY-7)26.05,27.07,26.09;C G
26.09	I (ETY-9)27.08,27.09,26.1;C I?
26.10	I (ETY-11)27.1,27.11,27.12
26.12	G 27.12;C I?
26.14	I (ETY-14)27.13,27.14,27.15;C N?
26.16	I (ETY-16)26.14,27.16,26.18;C P?
26.18	I (ETY-18)27.17,27.18,27.19;C R?
26.20	I (ETY-20)26.16,27.2,26.23;C T?
26.21	I (ETY-21)26.3,27.21,27.22;C U?
26.23	I (ETY-23)26.21,27.23,26.25;C W?
26.25	I (ETY-25)27.24,27.25,27.26;C Y?
26.30	G 25.01;C ERROR, ASK IT AGAIN...

27.01	S ATTL=ATTL+ENTRY
27.02	S BTTL=BTTL+ENTRY
27.03	S CTTL=CTTL+ENTRY
27.04	S DTTL=DTTL+ENTRY
27.05	S ETTL=ETTL+ENTRY
27.06	S FTTL=FTTL+ENTRY
27.07	S GTTL=GTTL+ENTRY
27.08	S HTTL=HTTL+ENTRY
27.09	S ITTL=ITTL+ENTRY
27.10	S JTTL=JTTL+ENTRY
27.11	S KTTL=KTTL+ENTRY
27.12	S LTTL=LTTL+ENTRY
27.13	S MTTL=MTTL+ENTRY
27.14	S NTTL=NTTL+ENTRY
27.15	S OTTL=OTTL+ENTRY
27.16	S PTTL=PTTL+ENTRY
27.17	S QTTL=QTTL+ENTRY
27.18	S RTTL=RTTL+ENTRY
27.19	S STTL=STTL+ENTRY
27.20	S TTTL=TTTL+ENTRY
27.21	S UTTL=UTTL+ENTRY
27.22	S VTTL=VTTL+ENTRY
27.23	S WTTL=WTTL+ENTRY
27.24	S XTTL=XTTL+ENTRY
27.25	S YTTL=YTTL+ENTRY
27.26	S ZTTL=ZTTL+ENTRY

28.10	D 22.3;D 22.2;T !"------------ EXTENDED SUMMARY ------------------------------------";T !;D 22.2;T !!
28.12	T !"--- TYPE ------- TOTAL AMOUNT -----"!!!
28.20	T !"AUTO         ",ATTL
28.21	T !"BUILDING     ",BTTL
28.25	T !"CASH         ",CTTL
28.30	T !"DOCTOR       ",DTTL
28.35	T !"ELECTRIC     ",ETTL
28.40	T !"FOOD         ",FTTL
28.45	T !"GAS          ",GTTL
28.50	T !"HOUSE        ",HTTL
28.55	T !"INSURANCE    ",ITTL
28.60	T !"JUNK         ",JTTL
28.65	T !"MOTORCYCLE   ",MTTL
28.70	T !"OIL          ",OTTL
28.75	T !"REGISTRY     ",RTTL
28.80	T !"SAVINGS      ",STTL
28.85	T !"TELEPHONE    ",TTTL
28.90	T !"XTRAS        ",XTTL
28.95	G 9.25
*U*#	2