rI ~ ~r~A:(~~~~~ 8$(275) 9 CLS sPRINT"T0 CREATE A NEW TAPE TYPE 0"," 12 PRINT"T0 UPDATE AN SLD TAPE TYPE '" 15 IboIPUT X '8 If X-I G0T0 63 21 CLS :PRINT"PUT 8LAfoJI{ DATA TAPE IN REC0RDER" 24 PR INT aPR I~T 27 INPUT"ENTER PURP0SE 0f TAPE";Q$ ~ INPUT'tENTER THE STARTING N VALUE (111)"1}< 32 INPUT"ENTER THE I~TERVAL BETWEEN N'S"lE 33 feR I-I T0 275 34 LET A( 1 )-}< 35 PR INT "Nt. 1A <I)J 36 PR IfoJT'·ENiER REMAINDER SF LINE" If D0NE E}JTER ••• " ~ INPUT B$ <I) INPUT"IS THE DATA CeRRECT (Y/N)"lD$ 39 IF DS-"N" G0Te 35 ~ IF B5(1).".**" G0T0 45 41 LET J<=K+E 4A NEXT I 45 LET C-I-I ~ INPUT"PUT REceRDER IN REC0RD MeDE, HIT ENTER";X 1$ PRINTt'THE DATA IS BEING REC0RDED" 52 PRINT 1-I,Q5,C as 55 f sa I -I . T 8 C 57 PR I NT 1 -1 , A ( I )" B5 ( 1 ) 59 l\iEXT 1 . 61 CLS :G0T0 100 . 63 CLS.INPUT"PUT REceRDER IN PLAY THEN HIT ENTER";X 65 PRINT"WAIT 0NE M0HENT PLEASE" 67 INPUT 1-1, QS, C 69 PRINT"TAPE T0 "lQ5 '72 If.;PUT"IS THIS THE ceRRECT TAPE <Y 0R N)";Z$ '7S If Z$- <>"N" THEt.i 84 ~ PRINT"PLEASE REWIND AND PUT CeRRECT TAPE IN" 81 INPUT"HIT ENTER";X:G0T0 63 84 PRINT"WAIT 0tJE JiS0MENT PLEASE" f51 FiR 1=1 T0 C ~ I NPtrr 1-1" A <1 ) " B$ ( I ) (jG NEXT 1 . 96 CLS:lIiPUT"TURN 0fF REC0RDER" HIT ENTER";X 100 CLS: PRINT"T0 DISPLAY ENTIRE FILE TYPE 1" 110 120 130 140 150 160 170 180 200 210 220 230 PRINT"T0 DISPLAY A S IhGLE LilIlE TYPE 2" PRINT"T0 INSERT A NEW LINE TYPE 3" PR INTttT0 CHANGE Alii 0LD LINE TYPE 4" PRI~T"T0 DELETE AN eLD LINE TYPE 5" PRINT"T0 CREATE NEW FILE TYPE 6" PRINP'T0 GET PRINT0UT TYP£' 7" PRINThiF D0AiE TYPE 8" INPUT-g:eN Q G0T0 2001300140015001600170018001999 CLS: PRINT: PRINT F0R I-I T0 C IF 1/11-F1X(I/ll)<>0 THEN 240 U/PUt"lilT ENTER KEY T0 C0111TUNUE PRINTING FILE"JX:CLS ~O PRINT "N"JA(I)J" "lBS(l) 250 ~EXT I 260 UiPUT"HIT ENTER KEY"lX :G0T0 100 300 CLSa INPUT"ENTER THE t.,/-IIiUMBER (III)";J 31 0 F 0R 1 I T 0 C 320. IF J-AU) THEil! 350 = 330 hEXf 1 340 PRINT"NU~~ER N0T IN FILE":G0T0 360 350 PRINT "N";A(I)J" "JBS(I) 360 PRINT: INPUT"FIJR AN0THER NUMBER TYPE 11 eTliERWISE O"JX 370 . IF XcI G0T0 300 ELSE 100 ~o CLS 410 IIIiPUT "ENTER N-NUMBER (III)"HJ 415 INPUT"ENTER REST eF LINE"JN2S 420 INPUT"IS THE DATA C0RRECT (Y SR III)";DS ~5 IF tiS."N"SeT0 400 100 F0R Q=1 T0 C 4'35 IF N < A(Q) TJiEN 445 ~O NEXT 445 F0R B-C T0 Q STEP -I 450 A(B+I)=A(B) 455 B$(2+1)=2$(2) .,0 NEXT 1fl0 I-Q: ACl)=N: B$(1)=N2S: LET C=C+l 480 INPUT"F0R AN0THER ADDITI0N TYPE 11 0TliERWISE O";X 490 IF X=I G0T0 400 ELSE 100 !CO CLS: INPUT"ENTER THE N-L1Jl'lBER F0R LIlliE T0 BE CHANGED";.) 510 F0R 1=1 T0 C: IF cJ=A( 1) THEN 540 seo IIIEXT 530 PRINTHIII-NUMBER N0T IN FILE":GeT0 570 540 PRINThTliE LINE N0W READS": ~5 PRINT-"N"JA(I)J" "SBS(I) 550 1fVPUT ·'ENTER THE ceRRECT LINE (W/O THE N-tWtBER)";BS(l) 560 PRIIIlT"THE C0RRECTED LINE REAJ;lS":PRINT"1I/ttIACl)J" ";BS(I) 570 INPUT"FeR AN0THER C£RRECTI0N TYPE II 0THERWISE O";X 580 IF X:l G0T0 500 ELSE 100 600 CLS :PRINT"E~i'ER THE N-NUMBER F 0R LIt.iE T 0 BE DELETED" 610 INPUT W 615 F0R 1-=1 T0 C: IF W-=A( 1) THE ... 640 620 NEXT 630 640 650 660 670 PRIt.;T .. lIl-NU .....sER NeT IN FILE" :G0T0 690 PRltIlTt'TIiE LINE PRESENTLY READS": PRINT"N";A<I)J" ";SS(I) C-C-l F0R' N=I T0 C LET A(N)=A(N+I): ' LET BS(N)=BS(N+I) 680 NEXT 685 PH INT'-THE -LINE HAS t-;0W BEEt-; DELETED'· INPUT"F0R AN0THER DELETI011l TYPE 11 0THERWISE oe,;x IF X=I G0T0 600 ELSE 100 CLS :PRUIT"INSERT BLANK TAPE I PUSH RECiRD AND PLAY" INPUT"WHEN READY HIT Et.lTER":;X ~O PRINT"C0PYING ••• " 725 PRINT- I-IIQSIC"· "130 F0R 1'1=1' T0 C· 690 695 700 710 r 30 Rlrpose: Rocords hours for each Shop Order number and detail number for each area of machining and totals the hours for the entire shop Explanation of output: (Seo sample output i'ollowing prosram listinB) 12j4 Shop Order number 3 1+,5, LI5 Detail numbers assocj.ated with this particular Shop Order number Hours spent on Lathe HITJ, Hours spent Eilling 80urs spont drilling, tapping, reaming or boring s.Gn. Hours spent surface Grinding Hours spent Cylindrical grinding 1 CLEAR 200 2 DIf".A(20,,20) 4 DI t' At (20) 6 DIM C(30) 10 CLS 20 INPUT"SH0P 0RDER" JA$ ~ INPUT ttlllU!-.BER 9F I TEf-:S",; C JIJ FeR 1=1 T 10 C 50 CLS 55 LET A ( I" 7 ) :() 'S7 LET D$ :"Y" ~ INPUT "DETAIL"JA$(I) 70 F 0R J =1 T 9 6 00 READ B$(J) ~ PRI~T BS(J)J 100 I NPUT ,A ( I" J) 11 0 NEXT J 120 RESTfORE 130 CLS 140 PRIt\T"DETAIL"",A$(l) 150 F0R J=1 T9 6 160 PR I t.T BS (J)" A ( 1" J) 170 NEXT ..1 180 FeR tiel T0 6 190 LET A ( 1" 7) =A ( 1" 7 ) +A ( I" J ) 200 NEXT J 210 PH INT"T0TAU' "A( I" 7) 220 I~PUT "IS THE DATA CeRRECT (Y 0R lII)"JDS 230 IF D!="N" THEN GeTe 50 240 ~EXT I 250 DATA TURfIi --- -" rw,ILL ----" DTRB --- -" S. GR .---" C. GR .---" MISC ~----~ 26 0 F 0R ..1 1 T e' 7 . 270 FER 1=1 T 10 C 28 0 LE T V ( ..1 ) =V ( J ) +A ( I " ..1 ) 290 NEXT 1 ~O NEXT ..1 310 LPRINT 320 LPRINT A$ 330 LPRINT ";"DTRB 340 LPR I "'.,." DE TA 1 L" ,,"T URN " h;hMISC. its .GR. ";"C.GR. It ;"TeTAL" 345 LPR lll:T 350 F0R 1=1 1'10 C 355 LPR ltv, 360 LPRINTA$(J)" 370 FOO ..1=1 T0 7 ";A(I"J)'; 380 LPRlNT USI~G"".I NEXT ..1 390 ~O LPRINT 410 NEXT 1 412 LPHlJo.T 414 LPRINT ""0 LPH I t.iT·'T tOTAL·'" 430 F0R J'"'l T0 7 "';V(..1); 440 LPRIIllT USING"',., 450 NEXT J = ... #8 Purpose: Figures cost of cylindrical and rectangular cold roll steel stock. INP\JT it of PIE:C.E S ES INPUT: LEoNI!:.11-1. WIDTH. WE 161-1 T C.OMPUTE VOLUME PRINT DIMENS10NS C.OM PUTE COST PRI~T i:t OF PIECES .x, C.O'5T PRINT NEW AMOUNT INPJT: DlAME"TER & LEN<=>TH 2 CLS 3 INPUT·', 0F P0UNDS".iN 4 IF N>O THEN 6 5 IJ.4PUT"IS THE STeCl{ CYLllliDRICAL CO) ~R RECTANGULAR (1 6 INPUT h PRICE/P0UND·',;P 7 I~PUT"CUTT 1M; CH!UiGE";R 8 IF N > 0 THEN 64 10 CLS aJ INPUT"'L t ' , ; L 3) INPUT"W" Hi I() 1 NPUT"H",; H :c LET It =L*W*H 58 CLS 59 PR UiT"DI tENS I 0NS="'; L"X·· ;W"X".iH 60 LETC=R+ (P*V*.283) 62 G0T0 70 64 ClS 65 LET C=CN*P)+R 67 IF N>O THEN 68 ELSE 70 68 PR I NT ·'NU I-'l3ER 0F P 0U NDS" HJ 10 PH INTC 71 LET D=CC*.15)+C 72 PRINT D 73 PRINT"PRICE/P0UND";P 74 PR INT"CUTT ING CHARGE";R 75 INPUT"IS IT 0.K. T0 C0NTINUE".iA5 79 RUlli ff) El\iD 100 INPUT"D";D 11 0 INPUThLh.i L 120 LET VcL*C3.14*CCD/2)*CD/2») 125 PRINT'·DIl-:ENSI0NS=";D"DU~. X";L 130 G0T060 )tt;S$ 32 Purpose: Ac1e.s uJl the hours for each employee under various categories for each week Explanation of output: (see sCl.ffiple output following rrogram lisU.l1g) m 1. • T'l 1.\ • Tool nOOE1 Tool ::loon llaint onane 0 Tool Room Supervision D. Broderick Broderick D}~. S. OVBD. l~aint enanc (; Broderick Supervision Overhead 1 CLEAR 200 2 DIl(, A(20,,20) ~ DIM AS (20) 6 nUl C(30) 10 CLS m UlPUT"DATE eR El"J'L0YEE";CS 3j l~PUT"toU1"'.BER eF Et'lFL0YEc.S 0R DAYS"';C 32 F0R 1-=1 T0 C 34 INPUT"NAME 0R DAY "JAS(I) 36 NEXT I 38_INPUT"IS IT e.K. T0 PR0CEED"';Z$ .tC FeR 1=1 T0 C 45 Cl.S J$ LET DS"'Y" !:O PRINTJA$(I) 52 LET A( I" 8)=0 55 FeR J=l T0 7 ~ READ S$(J) 70 PRINTS! ( J ) ; f() INPUT ACI"J) 90 NEXT J 100 REST0RE 105 CLS 110 PRUIT"NAl"'£""A$(l) 120 FeR J=I T0 7 130 PRINT BS (,J)"A(1" J) 1~0 NEXT J .145 F0R J=1 T0 7 146 LET A ( I ,,8) =A ( I "S ) +A ( I" J ) 1~7 .. EXT J 150 PRINT"T0TAL""A(I"S) 156 llliPUTulS THE DATA C0RRECT (Y lOR N)";DS 157 IF D$~"~" THE .. GeT0 45 158 ~EXTI 160 DATA T.R.----"T.R.~.--"T.R.S.--"BRD.----"BR.M.---"BR.S.---" WHD. __ _ ' __ , . _ . _". _ .... 170 180 190 000 210 211 212 214 220 230 235 240 250 ~o ~5 280 282 285 290 300 FeR- J=1 T0 8 F 0R 1 1 T 0 C LET V (J ) =V (J ) +,A (1" J ) NEXT 1 NEXT J LPRINT LPRINT C$ LPRINT LPR I NT" NAME ";" T.R. ";"T.R.M. to; ··T .R. S. "BR..... ., J uSR.5. . '0 -; "eVliD-. "; "T0TAL"F lOR I I T e' CLPRINT-U5ING"% % ";AS(l); F0R J=I T0 8 LPRl~T USING"'"., ";A(l"J); l\IEXT J LPRINT NEXT I LPRlt-JT LPR I~T"T0TAL "'; F0R J =1 T0 8 LPRINT USING"'"., ";V(J); = = ";"BRD. " . " ~HN T.R. T.R.M. T .R.S. 8.0 4-'0 4-'0 '0.0' 2-';0 BR.S. 0.0 O~O 0".0 S".O 0'.0 fRl 5-'0 4'.0 1'.0 1'.0 BRD. 0.0' 2.0 1;'0 0'.0 0-';0 1'.0 BR.M. 0.0 THU 0.0 0-'0 0.0 0".0 0'.0' 0'.0 0;'0 0-'0 0'.0 0'.0 33.0 5.0 0.0 4.0 BRD. S.O' 4-'0 4.0 2-'0 6'.0 _ME MiN roE ~D SAT TeTAL 1~0 eWD. T8l' AL 8.0 8".0 0'.0 0-'0 0.0 0-';0 2'.0 0'.0 0'.0 2'.0 8".0 0-'0 2'.0 S-'O 0.0 0.0 6.0 48.0 SR.M. SR.S. eVHD. TeTAL 0.0 4.0 0.0 0'.0 0-'0 4.0 8'.0 8-'0 2'.0 0.0 0'.0 0".0 0.0 0'.0 0-'0 8-'0 12.0 0.0 4.0 40.0 8'.0 8'.0 TeM lAME .eN T .R. 0.0 T.R.M. " 0'.0' T.R.S. 0.0 WE 0-'0 O~O O~O \ED TH flU 0'.0 0.0 0-'0 0'.0 0'.0 0'.0 0-'0 0-'0 0'.0 NTAL 0.0 0.0 0.0 24.0 4".0 2-'0 s.o 8'.0 1234 IETAIL TURl\ l';ILL DTRB S.GR. C.GR. 1>:ISC. T~TAL 34 12.0 12.0 12.0 12.0 12.0 12.0 72.0 5 5.0 5.0 5.0 5.0 5.0 5.0 30.0 ~ 6.0 3.0 4.0 2.0 7.0 1 .0 23.0 23.0 20.0 21.0 19 .0 2i.1.0 18.0 T0TAL %125.0 3) #10 Purpose: Using the information produc ed by progran ;;:9 this program computes the shop's profit or loss for the wee>: Explanation of output: TOOL ROeM RATE (See sample output following program listing) Amount charged per hour Amount charged per hour for Broderick work SHOP Lists the data from which the rest of the information is derived COST Cost per hour to run the shop PEeD. Cost per hour for production (manufacturing) NOLJPROD. Cost per hour for nonproduction (supervision, etc.) OVHD. Cost per hour for overhead (lights, heat, etc.) Total overhead to run shop for week Percentage of hours in nonproduction Frofi t or loss for wee',,\. :;~ FROFI'l' ;ercentage on return on money spent (Note: Tho example uses fictitious data, the shop could not function very loni:'; with figures like these!) COS'I' Cost shop would have to charge to break even 1 O;~, Cost shop would have to charge to mah:e 10; 20; Cost shop Vlould have to charge to make 20;j Same brea~\.dovrn as above except specifically for the tool room Same breal"dovm as above except specifically for 3roderick: work ---------_..-- - --- ---._-------- 1 CLEAR 200 DIt A(20"10)"AS(20)"BS(20)"D(20)"E(20)"G(20)"H(20),,L(20) 20 DIt 00(20),EE(20) 100 CLS 110 INPUT"DATE ";CS 112 INPUT"T00L R00~ RATE";U W 114 I NPUTtlBR "DER I CX RATE"; V 120 125 126 127 128 INPUT"tliU ..lBER fiR EMPL0YEES ";C INPUT u 0VERHEAD ";F F 0R I == 1 T 0 C INPUT"NAME ";AS (1) IIIEXT I ~9 INPUT"IS IT 0.K. T0 PR0CEED";ES 130 F0R 1=1 T0 C ' , 132 LET DS ="Y" 134 LET A ( I" 8 ) =0 135 ClS ~6 PRIIIITJAS(I) 140 FaR .J e l- T0 7 150 READ BS(.J) ~O PRIIIIT BS(.J); 170 I NPUT A ( I".J ) 180 NEXT .J 190 RE5T0RE 200 CL5 210 220 230 240 25 0 260 270 280 290 300 310 320 330 340 350 360 ~0 380 390 J()O 41 0 415 leO 430 440 450 460 1lI0 IlI5 PRINT".NA~E",AS(I) FeR .Jel T0- 7 PRINT BS(.J),A(I,.J) NEXT .J F SR J e 1 T 0 7 LET' ACI .. 8)=A(l .. S)+A(I,.J) NEXT J PRINT PRINT"TeTAL·· .. A (l,S) II11PUT"I5 THE DATA C eRRECT (Y eR N)tt ;OS IF DS,=uN" THEN G0T 0 132 NEXT I DATA T.R~----"T.R.M.--,T.R.5.-OATA B~D'. ;.;.;.:., BfiO'.I·f. :.;." BfiO~ 5. ;."- .. 0VRHO.-FeR ..1=1 T~' 8' . . ... F0R 1=1 T0 C LET V (..1 ) =V (..1 ) +A ( 1 .. ..1) f..IEXT I NEXT ..1 FeR 1=1 T0 C CLS LET DS -"Y" PRINT AS(I)JA(I,S) UiPUT··R";A( 1 .. 9) U.PUT"B" ; A<I, 10) INPUT"IS THE DATA C0RRECT (Y eR N)"JOS IF OS=uN-' THEt.l GeT0 410 NEXT I CL5 14J.i0 RE,. 1450 LPRINT .... 490 FeR 1 =1 1'10 C 500 LET 6CI>=ACIII0)/ACIIS) 510 NEXT I =eO RE~ C0ST 01' 3000 530 F0R 1=1 1'0 C 540 H(I)-A(117>*(A(II9)+G(I» . 550 NEXT I 560 FeR 1=1 1'10 C SlO 580 590 600 610 620 630 640 650 660 670 680 690 100 H=H+IH I) ~E.XTI REI': C0ST 3000 AND f0R 1=1 1'0 C LCI)=ACII1)+A(II4) 0VERHEAD/~RODUCT NEXT 1 FeR 1=1 Te C MII:~+L(I) NEXTI LET N=CK+F)/}/i RE tt: CALC. T.R. C eST /PR 0D. liR. FeR I-I 1'0 C DCI)-A(Ill)*(A(119)+G(I» NEXT I 710 FeR 1=1 T0 C 720 , E ( I ) = (A (112) +A ( I I 3) ) * (A (119) +6 ( I ) > 725 NEXT I 730 FeR I-I T0 C 0=0+D( I) 740 750 NEXT I 760 FeR 1=1 T0 C P=P+E(I) TlO 7S0 IliEXT 1 - 790 feR I z:1 T0 C 5 =S +A (II I ) £00 S10 NEXT 1 ~O LET Q =0/5 830 LET R-P/S 840 LET t z:Q +R+N 850 RE.; CALC. BRD. C0ST/PD~ li0UR 1:60 FeR 1=1 Te C LEt DD(I)=A(114)*(A(119)+G(I» 810 880 NEXT I 890 F0R I-I T0 C roo LET EE(I)=(A(II5)+A(II6»*(A(119)+G(I» 910 NEXT 1 920 feR 1=1 T0 C LET Sf) &00+DD( 1 ) sao 940 lIJEXT I ~O FeR 1 =1 T0 C LET PPcPP+EE( I) 960 rno NEXT I 980 FeR 1=1 T0 C 990 LET SS =SS+A( 114) 1000 NEXT I 1010 LET QQ =00/SS 1020 LET RR=PP/SS 1030 LET T1 SQ+RR+N leN li0UR 1050 1060 1070 1080 1090 1100 1110 1120 1130 1140 . LET W-S *U LET X aSS.V UTY-W-(T*S) LET Z.X:'(TT*S5) LPRUiT .LPRurr LPBI»T LPBlIiT" LPRINTLPRINT"DATE -'CS 1150 LPR~NT"T'lt R"~ 1160 LPRI~~BR'DERICK SHIP RATE~ PR8FIT~L8$S TABLES" RATE"IV RAT£-JV 11 10 LPR n.T' SHIP" 1180 LPR Uri'" 1190 LPRUiT1200 LPRl»T"~AME 1220 1230 1240 1250 1260 "I" T.R. "J"T.R.M. ";"T.R.S. ";"BRD. "BR.M. ~;"BR~S~ "i"IVHD.-"J"TITAL~ FIR 1.1 T' C LPRINT USUIS"I FIR "alTI 8 , LPRINT USl ..." ' , ' . ' "IA(I~~)J NEXT" "I 1265 LPRIJ~T 1270 liEXTl 1280 1290 1300 1310 '1320 1321 LPRINT LPJUNT"TITAL "; FIR eJ8. TI 8 LPRINT US1.6"",., NEXT .J "JV(~); - LPRINT 1322 LPR 1 In' 1324 LPJUNT"CIST"" "PRID.-" "NINPRD." ,,"IVHD.-' '"J «I"+i+P+PP)I)l)+tH 1326 LPRINT USING-i,.,,-·· - (11+'")/'0 (P+PP)/MUJ 1327 LPRIaiT 1328 LPRINT"CST. 8F .PRT•• • .. JF 1330 LPRINT"S ~~PR.DUCTI.~a";USINGH ".'"J«V(2)+V(3)+ V(S)+V(6)+V(7»/V(S»*100 1350 LPRIaJT"SHIP PH'" IT·-~-US 1N&""" ." .. ;Y+Z 1360 LPRINTMI PRIFITa""USIN6" ,i,."h;«Y+Z)/«T*S)+(TT*SS»)* 100 1370 1375 1390 1400 1405 1410 - , CALC. IF I.D. RATE LPRINT . LPR 1 NT-' tilAME" " "e eST" , "I 0 I." , "20 I" FeR 1.1 Te. C' LET BScO IF A(I"I»O IR AC1,4»0 THE. LET BB8C(DCl)+DD(I»/(A(I~I)+A(I~4»)+~+«P+PP)/M) ELSE 1420 RE~ 1415 £LSE1430 1420 LPBINTAS(I)JA(I,9)"USING""." .. (BS*-;'I », -(B8+ (BS*.2) ) 1430 »EXT 1 1440 REtr; TilL Reet: 1450 LPRINT ~ ..,--~--~.~.-.~---.------.~----~~------~--~------------- "SCI,.S . .t"n' Gi".= lit = j~;)C:: j.,Jo'I( UVJ 1454.LPRUIT 1456 LPRIM' TieL Re8M" 1460 LPB INT" 1470 LPR UIT1480 LPRINT"CeST",,"PReD.",,"NPRD.",,"iV~D." 1.1& 90 LPJU til' - US I NG" " .,,' . . . " J T J Q)liI N 1500 'LPR I til' . 1510 LPRINT"S T.R.H.-T.R.S.~";USING" ".'";«V(2)+V(3»/ -(V ( 1 }+V (2) +V (3» ).100 1520 LPRUIT"T.R. PRiY 1Th" US ING"'", .,,";y lS30 LPRINT"S- PR.FIT""USING'· (V/(T.S) ).100 -. 1540 L~I~' 1550 LPRINT"~ME",,"CeST",,"IOS",,"20S" 1560 LPRINT"DEPTftiUSINGft,i.,,--"ITI(T+(T •• l » ; ,i,."ft; J (T+(T.~a»- .---- 1570 RE-Ill BReDERICK 1572 LPRINT 1580 LPRUIT" BR8DEBICK" 1590 LPB Ul1" 1600 LPR INT"CeST"" "PBeD ."" "NPRD.",,"eVHD e" . -. h;TT ;QQ;RRnl 1610 LPBUIT USING"" .,,' _. 1620 LPRINT 1630 LPRINT"S BR.H.-BR.S.-"JUSING" ".'"J«V(5)+V(6»/ . (V(4}+\1,(S)+V,,(6»).100' 1640 LPRINT"BBD. PRIFIT"iUSING""".,,"JZ 1650 LP1UNTt'S PR8FI~ ~""USUI6" " , .,ft; (2/(TT.SS) ).100 1660 LPRINT1670 LPR I NT" NA ME"" "CeST", "lOS" ,,"20S" "ITTJ(TT+(TT*.I»; 1680 LPBINT"DEPT"iUSING"i'."--(TT+(T1 •• 2) ) 1690 EAJD TilL R.eM teST 24.13 PRID. ~PRD. 8.~3 IVHD. 1.28 14.43 S T.R.H.-T.R.S •• 13.2 T.R~ 28~69 PRIF IT S" PlilFIT . . ..E IEPT 3".60 ceST 24.13 lOS 26.54 201 28.96 . BRID£RICJ< teST 25.15 PReD. 7.55 18R ••• -BR.S.&tD.· PlliF It . S PReFIT- 30.0 -14Ji.29 • ~0·.5 -- .IEPT NPRD. 3.11 IVHD. 14.~3 . CIST 25.15 lOS 27.67 201 30.18 Purposo: ri.lo create: uo.ta tapes to l~eep tracl-:: of the .sh09 Order Dunbers, l)ric e charged, mat erial cost, hours sp~nt, shop order. and rate per hour made for each A separate data tape is produced for each company Variable Dictionary Two dimonGional array of price, materials, and hours for each shop order number A.' (T) Array of shop order numbers Dumber of shop orders c Customer llame :,( -T) Rate per hour for each shop order number ~, 35 PRINT IN~TRULTION~ INPUT= GVS1"oMER NAME NUMBER of JO~ YES INPUT: --~\JJCRE:M ENT INbEX es ...- - - - - 1 INC.REME NT rtJDE~ 36 LOMPtJTE RATE PER !-lOuR REc.ORD C.USTOME R NM1E " # OF .JOB':> REU)RD 'SJ..k)P ORbER NOM 6fR PRK.E. ~ATERIAL J !-lOURS l RATE I 10 CLEAR 1500 20 Illf-. A(300",3)", E(300) 30 DU'. A$(300) ~ CLS :PRINTnpUT BLANK DATA TAPE l~ REC0RIlER" 16 PR INT"PUT REC0RDER 1111 REC0RD M0DE" :PRINT :PRINT SO I I\iPUThCUS T 0!"£R t-lAt-:E"; C$ 60 INPUTttNUMBER .JeBS",; C 65 PRIl\]T" UiPU.T .J0B NU~BERS It.; NUMERICAL 0RDER tt 10 F 0R I &: 1 T e C Ef) INPUT".J0B NUl-.BER (II")";A$(I) ~ NEXT I 100 INPUT"HIT ENTER HEY"; X 110 FeR 1=1 T~ C 120 CLS .. 130 LET DS="Y" 140 PRINTJAS(I) 150 FeR .J=1 T 0 3 ~O READ BS(.J) 170 PRINT BS(.J); 180 INPUT A <I",.J) 190 NEXT .J 200 REST0RE 210 CLS 220 PR INTt.tNAl-'.E" ",A$ (I) 23 0 F 0R .J" 1 T 0 3 240 PRINT BS(.J)",A(I",.J) 250 NEXT .J a60 INPUT··IS THE DATA ceRRECT (Y eR N)"'';DS 270 IF DS="~" THEN G0T0 130 280 NEXT. I 290 DATA PRICE ",!"lAT.",HRS. 300 F0R 1=1 T0 C 310 LET E(l)=(A(l",1 )-A(I",2»/A(I",3) 320 NEXT I 325 PRINT"THE INFeRl-ATI0N", INCLUDING THE RATE", IS BEING REC0RDED" 330 PRINT I-l",C$",C 340 F0R 1&1- 19 C ~o PRINT 1-1",AS(I)",A(I,1)",ACI",2)",ACI,3),E(I) 360 NEXT I 370 END 37 ,/12 2urpose: To update the data tapes created by the eleventh program. Tho program reads the old data tape and then the operator can do several things. They can display the entire file or just a single Ij_ne (ref8rCnCeo. by tLc s1;.o;-; orewr nUli~ter), they can insert a new line - the new line will be placed in the correct numerical location (shop order nWr1bers are listed numerically), change an existing line, delete an old line, display average rate :per hour for that IJarticular company, or create a new data tape with the necessary changes. Irate: necause data tapes may be lost, damaged, or improperly recorded there will be two data tapes for each company. The old data tape will be updated and a new tape will be created. If the new tape is not recorded properly or is lost or damaced the operator can rerun the program using the old data tape. ':i'1en another update becomes necessary the newest tape is read in and updated creating a third tape. Tho first tape can then be erased and used over again. 38 Variable A(I,3) Dictionar~ Two dimensional array of price, materials and hours for each shop order number A:1;( 1) Array of shop order numbers C lJine Counter Customer ['lame E(I) Rate per hour for each shop order number Format for output of shop order numbers FS Format for output of prices, material cost Format for output of hours Format for output of rate per hour 1TH Temporary variable for new hours HE Temporary variable for neVi material ITP Temporary variable for new price }!l~ Temporary variable for new rate per hour COE;t Temporary variable for new shop order number V( 1) Totals prices V(2) Totals material cost V(3) Totals hJurs -----_.--_ -. .. CLEAR 5TRlN6 5PAc.e READ C.US.TOMER hlAME Z # or: 5Hop ORDER i* I ~ PRINT CUS,oME.R NAME YES PRINT ERROR MES5A6E ** R~AD Si-ioP ORDER PRICE. MATE RIAL, HOUR'S iRATE" f Li 1 Dl5PLAY ENTIRE FILE YES 5 NO C.LEAR S(REEN PRINT LINE INCREMENT I NOE)( !f2 D\5PLAY SINGLE LINE S('REEN INPUT SHOP ORDER ~ YES Sequential search for shop order number Subroutine to print line t--------I YE5 PRINT ERROR MESSAbE iNSERT NE\rJ LINE INPUT; SHOP OltDER t:t:, PRIC.~, &. HOURS MATERIAL. NO * ORDER II\lSERT/oN PoIN T F oUND ~~"--..., "} INDEx =-----------1 DELRE M~NT I NDE 'X. l~seRT If end of array is reached then the shop order number to be inserted is larger than any of the numbers presently in the file Search for correct insertion position for new line to maintain correct numerical ordering of lines Renumber the indexes for the lines in the file after the new inserted line NEW' UNE INCREMENT LINE COUNTER Subroutine to print line C\-\ANGE OLD LINE INPUT ~~OP ORbER i:t ES Sequential search for shop order number Subroutine to print line It.,IPUT coRREC.T~1> LINE C.OMPUTE NEW RATE ~-------IPR.INT ER.RDR MESSA6t: :';5 DELETE OLD LINE tt: INPVT SHOP ORbER Shop order number for line to be deleted INDEX Subroutine to print line YES DEcR£MENT UNE c.ouNTER. YES ----tINC.REMENT INDEX Renumber lines following deleted line D\SPLAY AVERAGE RATE PER HOUR YES YES C.OMPuTE TOTALS O~ PRICE. MATE'RIAL. &- HOURS , ~- ' C.OMPUTE lit PRINT RATE Nested Loop: V~ll -- totals price V 2 -- totale mater. V 3 -- totals hours CREATE NE\N FILE RECORD C.USTOMER NAME 8, LINE COUNTER NO ReCORD LINES PR1NTOUT i(5i\r?""::~'(1!~~"5L----I PRINT OF FILE CUSToMER NAME PRINT ~!;ADERS l'RINi LINES ES COMPUTE loi ALS OF PRICE. MAiER IAL, " HOUR~ 1~"aMfNi INDE~ '----I 2 INC.REMENT INDEX 1. ~--' P~INT ToTAL MATERIAL PRIC.E. 2, HOURS c.oMPLJTe g PRINT OVERALL AVf:RA~E RATE PE~ HOuR DONE 1 CLEAR 1500 2 LET FS;=""",."" 3 LET GS=·'II".I" ' 4 LET HS=·"".I,,, 5 LET £$="% %" 8 DI~ AS(300)"AC300"3),,E(300) to CLS : INPUT"PUT RECeRtlER 1111 PLAY TIiEN HI T E~TERtt;X ro PR I NT" INPUT ING ••• It 30 INPUT '-I"CS"C ... 3S LET CI =0 4J PR INT"IiATA FeR "; CS S) INPUT"IS THIS THE ceRFECT DATA TAPECY 0R N)"; ZS 60 IF Z.$<>"~" TIiEN 65 62 PR l~T"PLEASE REWIND THIS DATA TAPE AND PUT THE C 0RRECT TAPE IN" 63 INPUTt'HIT ENTER";X :G0T0 1 65 PRINT"WAIT 0NE tr:0tw:ENT PLEASE" 70 F0R 1'=1 Te C 75 INPUT '-I"ASCI)"A(I"1)"ACI"2),,ACI,,3),,E(1) 8) NEXT <;0 CLS :INPUT"TURN £IFF THE REC0RDER" HIT E~TER··iX WO CLS :PRI~T' 10,,"**. "iCSi" ••• " sPRINT :PRINT 11 0 PR 1 NT':T0 DISPLAY ENT IRE FILE TypE 1 It 120 PRINT"'T0 DISPLAY A SINGLE LINE TYP£'- 2" 130 PRINT"'T0 INSERT A l-4EW LINE TYPE 3" ~o PRINThT0 CHANGE AN 0LD LI~E TYPE 4" 150 PRINT"T0 DELETE AN 0LD LINE TYPE 5" 160 PRINTt'T0 DISPLAY AVERAGE RATE PER HeUR TYPE 6" 170 PR INT"T0 CREATE NEW FILE TYPE 7" 175 PRINTt'T0 GET PRINT0UT TYPE 8" " 180 PR I fliT" IF De1\lE TYPE 9 0 • 190 INPUT Q :011i Q GeT0 200,,300,,400,,500,,600,,700,,800,,900,,999 roo CLS aPR INT"S. 0.1 PR ICE MAT. . HRS. RATE" rol PRINT :FfOR- 1=1" T0 C 002 IF 1/10 -F IX (1/10) <>0 THEN 204 ro3 INPUT"HIT ENTE~ T0 CeNTINUE PRINTING FILE";X ICLS 004 PRINT USltIlG ESiAS(I)';" u; 005 PRINT USING F$iA(I"I); ro6 PRINT" .. ; ro7 PRINT USING FSJACI,,2); 208 PRINT" It.; 009 PH IlI.T US IlliG GS';A (1,,3)'; 210 PRINT" H; 212 PRINT USIl\.~ HSlEeI) 214 NEXT 220 INPUT"l1IT EfliTER KEY";X :GeT0 100 300 CLS :INPUT"ENTER TIiE SIHIP 0RDER NUMBERC"")";uS 310 F 0R I == 1 T £I C 313 IF uS=ASCI) THEN 325 317 NEXT ~O PRINT"NU~BER N0T IN FILE" :G0T0 340 ~5 G0SU13- 1000 340 PR INT : I NPUT"F eH AN0TliER NU l".BER TYPE I" 0THERW 1 SE 0 H; X 350 IF X=1 G0T0 300 ELSE. 100 4)0 CLS 4)5 PRINTtlENTER S.0. NUMBERC'",)" PRICE" MAT." HRS-<SEPARATED BY C0MJ>AS' 410 INPUT iii!" NP,,' N~" NH 415 INPUT"IS THE- DATA CeRRECT CY 0R N)"';DS ~5 LET fliR=(~P-Nft':)/fI;Ji 1430 FeR Q=1 T0" C 435 If "S <AS (Q) THEN 442 440 IIlEXT 442 feR N-C Te Q STEP -1 444 LET AS(N+l)=AS(N) 446 LET A(lv+I,1 )=A(N,l) 448 LET A(N+I,2)=A(~,2) ~O LET A(N+I~3)-A(N,3) 452 LET EO~+l) =E(N) i65 NEXT 460 LET IcQ 462 LET AS (1) =NS 464 LET A(lll)=~P 466 LET A( I~2) =Nti 468 LET A(I,3)=~H 470 LET E'( I )aNR ifl2 LE T C =C + 1 Jfl5 PRINT"THE LINE READS: .. ~O 'G0SUB 1000 482 INPUT"F0R AN0THER ADDIT10N TYPE. I, (oTHERWISE O";X ~O IF X-I G0T0 400 ELSE 100 ~O CL5 :PRllv~"ENTER THE S.0. NUMBER("") f0R LINE T0 BE CHANGED" 510 I~UT ~S :t20 FeR I -I T0 C : IF ~$ =AS (I) THEtI; 540 525 NEXT 530 PRINT"SH0P 0RDER NUMBER NeT IN F ILEn : G0T" 589 540 PRINT"THE LIt-E 1II0W READS" :G0SUB 1000 545 PR INT"ENTER THE C0RREeT S. 0. NUMBER (,,,,) I PRICE, MAT q HRS. to 547 PRUITf'(5EPARATED BY C0trlMAS)" ~O INPUT AS(I),A(III)IA(I,2),A(I,3) ~O LET E(I)=(A(I,I)-ACI,2»/A(I,3) 570 PRINT"THE C0RRECTED LINE READS: .. 580 G0SUB 1000 589 INPUT"F0R AN0THER C0RRECTI0N TYPE 1, 0THERWISE O";X 590 IF X=l GeT0 500 ELSE 100 WO CLS :PRINT"ENTER THE 5.0. lv1JMBER('"I) F0R LIa-.E T0 BE DELETED" 610 INPUT WS 620 F0R 1=1 T0 C :IF WS=AS(I) THEN 640 625 NEXT 630 PRINT"SH0P 0RDER NUMBER N0T IN FILE·' :G0T 0 670 640 PRlhTtlTHE LINE PRESENTLY READS:u 642 G0SUB 1000 643 INPUT"ARE Y00 SURE Y00 WANT T0 DELETE THIS LIlvE(Y 0R NU;XS 645 IF XSi;:ttN" THEN 100 647 LET C=C-l 650 FeR N=I' T0 C 652 LET AS(N)=AS,(N+l) 654 LET A(N,l)=A(N+l,l) 656 LET AO,j,2)=A(N+I,2) 658 LET A(N,3>=A(N+113) 660 LET E(N)=E(N+l) 662 NEXT 665' PRUJTttTHE LINE HAS New BEEN DELETED" 670 INPUT"FeR AN0THER DELETI0N TYPE 11 0ThERWISE O";X 675 IF X=l G0T0 600 ELSE 100 700 CLS 705 F0R K=1 T0 3 707 LET V (K) =0 710 F 0R L =1 T 0 C 720 LET V (K)=V(}{)+A(LIK) 730 }.IEXT L I /" 71.0 745 750 155 760 8)0 E05 810 820 830 835 840 (60 e60 fS10 <;00 so 1 S02 S04 S05 910 c;e 0 NEXT K CLS PRINT"AVG. RATE PER HR. FeR ";CS;" IS ";(V(1)-V(2»/V(3) INPUT"Te CSNT INUE HIT ENTER";X GeTS 100 CLS :PRINT"INSERT BLANK TAPE~ PUSH REC0RD AND PLAY" INPUT"WHEN READY HIT ENTER";X PRINT u C0PYING ••• I t PRINTI-1~CS~(t~t1) FSR Mal' TS C PRINT #-I~A$(M)~A(M~I)~A(M~2)~A(~~3)~E(M) NEXT, PR INT"C0t<.PLETE --N0TE TAPE" INPUT"Te CeNT INUE HIT ENTeR";X GeT0 100 INPUT"ARE Y0U SURE THE LINE PRIlliTER IS 0N <Y 0R N)";XS IF XS<>"N" THEN 904 PRINTt'TURN C0lW'.PUTER eFF AND START WER" aG0T 0 999 PRINT"THE PRINTER IS New PRINTING--IN CASE yeu CANT HEAR IT'· LPRINT"DATA FeR ";CS :LPRINT :LPAINT LPRINT"S.·S.' - PRICE YAT. HRS. RATE" LPR I lilT c;co FeR M-l T0 C 940 .!.PRINT USI.NG ES;AS(M);n tt; 94S !.PR INT US ING F$;A <t1~ 1); ~7 LPRINT" tt; 950 LPR INT USING FiiA (M~2); 955 LPR UJT" •• ; ~O LPRINT USING G$;A(M~3); ~5 LPRUtr" "; VlO LPRUtT' USING HSiE(M) VIS NEXT ~o FeR KlCl T0 3 982 LET V(K)=O 984 F 0R L 1 T e C 986 LET V(K)IIi:V(K)+A(L~K) 987 NEXT L 988 NEXT K 989 LPRIlI.1'f: LPRINT"T eTAL .. i WO LPRINT USING FSJV(l)i 991 LPR UiT" "; LPRINT-USING FSJV(2); 993 LPR INT" t.; 994 LPRINT-USING GS;V(3) W5 LPRUIT :LPRINT"AVE. RATE PER HR. FeR ";CS;" IS ";(V(1).fl<2»/V(3> W6 INPUT"Te C8NTINUE HIT ENTEW'iX 997 GeTS -100 999 END 1000 PR INT US ING ES;AS <I);" .. ; 1010 PRINT USING FSJA(Ill>; 1020 PR IN," .. J 1030 PRI~T-USING FSiA(I~2)J 1035 PRIm" "i 1040 PR INT US UIG GSlA( 113); 1050 PRINT" .. ; 1060 PR INT US ING liSJE (1) 1070 RETURN = wa · ~ . , I 50 Any upgrading of the rl'[~S-80 I,evel II micro-computer requires the purchase of an expansion interface. terface with no additional memory sells for The in- ~299.00, an additional 16K $398.00 and with an additional 32K with ~~97.00. The interface allows tho use of an additional cassette recorder (~59.95) and up to four mini-disks ($499.00 each). The additional cassette recorder would allow easier updating of data stored on cassette tape. The mini-disks would create much more storage - 80,000 bytes for the first disk and 89,000 bytes for each additional disk. The first disk drive includes Radio Shack's Disk Operating C's·te m ('T'TlSDr.C) 0Y",~_n 1_,0. The use of disks would allow for much quicker storage and retrieval of information. A plotter/prj.nter is also available from Padio Shack, and could be used on the TI~S-80 of the expansion interface. 1.evel II with the addition The printer, costing 1~1,460.00, would enable a programmer to draw various lines, curves and geometric shapes. would enable Mr. }~aryan The use of the plotter/printer to test his programs on paper be- fore actually manufacturing a part. These additions to the present system at Hiatt l·letal Products would be greatly appreciated, however the cost is prohibitive. There is still a great deal more Mr. Maryan can do with his Radio Shack system as it exists now, and if the need arises he can expand his system. His present 16K RAH can be expandEjd up to h8K and with tb e addition of four disk drives maximum storage capacity is 307K bytes. Even without the disl-<: drives there is an unlimited amount of off-line storage via the cassette tapes. The TRS-80 at Hiatt I/etal rroducts is becomming more and more valuable as new programs and uses are found for it. As more ene machines are purchased by fliatt IljE)tal IToducts the l\adio Shack Tr~s-80 will be needed more and more as an interface between man and machine.