Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50144/twoplo.bas
There are 2 other files named twoplo.bas in the archive. Click here to see a list.
1	LET J=0
2	LET P7=0
10	GO TO 620
20	LET Z=X^2
100	LET Y1=Z
105	LET T=0
110	LET T1=0
115	IF J=0 THEN 125
120	RETURN
125	PRINT
130	PRINT "WHAT ARE  FMIN,FMAX,XMIN,XMAX,DELX";
135	INPUT Q0,Q1,Q2,Q3,Q4
140	LET Q5=(Q1-Q0)/60
145	LET Q6=0
150	LET J=2
155	FOR X = Q2 TO Q3 STEP Q4
160	GOSUB 10
165	IF Q6=0 THEN 315
170	IF Q6 = 20 THEN 185
175	PRINT " . ";
180	GOTO 195
185	PRINT " - ";
190	LET Q6 = 10
195	IF Y > Q1 THEN 305
200	IF Y1>Q1 THEN 305
205	IF Y < Q0 THEN 305
210	IF Y1<Q0 THEN 305
215	LET Q7 = Q0 + 2*Q5
220	LET Z=Q7+0.5*Q5
225	IF T>0 THEN 435
230	IF Z<Y THEN 430
235	IF T1>0 THEN 250
240	IF Z<Y1 THEN 250
245	GOTO 490
250	IF Z-Y>=2*Q5 THEN 280
255	IF Z-Y>=Q5 THEN 270
260	PRINT "  +";
265	GOTO 370
270	PRINT " + ";
275	GOTO 370
280	PRINT "+  ";
285	GOTO 370
290	PRINT "   ";
295	LET Q7= Q7+ 3*Q5
300	GOTO 220
305	PRINT "OFF SCALE.  (X,Y,Z) =";X;",";Y;",";Y1
310	GOTO 380
315	PRINT
320	IF P7=99 THEN 335
325	PRINT
330	PRINT "(NOTE: Y IS PLOTTED '+', Z IS '.', AND '0' IS COMMON POINT)"
335	PRINT
340	PRINT "FOR X:       TOP = ";Q2;" BOTTOM = ";Q3;" INCREMENT = ";Q4
345	PRINT "FOR FCTS:   LEFT = ";Q0;"  RIGHT = ";Q1;" INCREMENT = ";Q5
350	PRINT
355	PRINT "   I.........I.........I.........I.........I.........I.........I"
360	PRINT
365	GOTO 185
370	LET T= 1
375	IF T1=0 THEN 295
380	LET Q6=Q6+1
385	IF INT(Z)=Q1 THEN 395
390	PRINT
395	NEXT X
400	LET P7=99
405	PRINT
410	PRINT
415	PRINT "TYPE 'S' TO STOP NOW, OR ELSE SPECIFY NEW VALUES"
420	PRINT "FOR  FMIN,FMAX,XMIN,XMAX,DELX";
425	GOTO 135
430	IF T1>0 THEN 290
435	IF Z<Y1 THEN 290
440	IF Z-Y1>=2*Q5 THEN 470
445	IF Z-Y1>=Q5 THEN 460
450	PRINT "  .";
455	GOTO 475
460	PRINT " . ";
465	GOTO 475
470	PRINT ".  ";
475	LET T1=1
480	IF T>0 THEN 380
485	GOTO 295
490	IF Z-Y>=2*Q5 THEN 580
495	IF Z-Y>=Q5 THEN 540
500	IF Z-Y1>=2*Q5 THEN 530
505	IF Z-Y1>=Q5 THEN 520
510	PRINT "  O";
515	GOTO 380
520	PRINT " .+";
525	GOTO 380
530	PRINT ". +";
535	GOTO 380
540	IF Z-Y1>=2*Q5 THEN 570
545	IF Z-Y1>=Q5 THEN 560
550	PRINT " +.";
555	GOTO 380
560	PRINT " O";
565	GOTO 380
570	PRINT ".+";
575	GOTO 380
580	IF Z-Y1>=2*Q5 THEN 610
585	IF Z-Y1>=Q5 THEN 600
590	PRINT "+ .";
595	GOTO 380
600	PRINT "+.";
605	GOTO 380
610	PRINT "O";
615	GOTO 380
620	PRINT
625	PRINT "THIS PROGRAM WILL SIMULTANEOUSLY PLOT TWO FUNCTIONS"
630	PRINT "OF A SINGLE VARIABLE X.  TO USE, TYPE:"
635	PRINT
640	PRINT "   10 LET Y= (THE FIRST FUNCTION OF X)"
645	PRINT "   20 LET Z= (THE SECOND FUNCTION OF X AND/OR Y)"
650	PRINT "   RUN"
655	PRINT
660	PRINT "THE FUNCTIONS Y AND Z MAY BE ANY LEGITIMATE 'BASIC'"
665	PRINT "EXPRESSIONS.  INTERMEDIATE VARIABLES MAY BE DEFINED"
670	PRINT "USING INTERMEDIATE LINES, IF THE FUNCTIONS ARE TOO"
675	PRINT "COMPLICATED TO FIT ON ONE LINE."
680	END