Trailing-Edge
-
PDP-10 Archives
-
decuslib20-03
-
decus/20-0078/demos/libtes.sim
There are 2 other files named libtes.sim in the archive. Click here to see a list.
00010 OPTIONS(/P:"Tests of external MACRO-10 procedures");
00020 BEGIN
00030 EXTERNAL TEXT PROCEDURE conc,daytime,today;
00040 EXTERNAL REAL PROCEDURE clocktime,cptime;
00050 EXTERNAL INTEGER PROCEDURE output,putsize,input,scanint;
00060 EXTERNAL TEXT PROCEDURE rest, frontstrip;
00070 EXTERNAL PROCEDURE write,read,sleep;
00080 EXTERNAL TEXT PROCEDURE inline,upcase;
00090 TEXT p,t,t1,t2,t3,t4,t5,t6;
00100 INTEGER i,j,k,l,m,n;
00110 BOOLEAN b,b1,b2,b3;
00120 REAL r,r1,r2,r3;
00130 LONG REAL lr,lr1,lr2,lr3;
00140 CHARACTER c,c1,c2,c3;
00150 REF(Infile)inf,inf1,inf2;
00160 REF(Directfile)df,df1,df2;
00170 REF(Outfile)ouf,ouf1,ouf2;
00180 REF(Printfile)prf,prf1,prf2;
00190 CHARACTER testchar;
00200 TEXT im;
00210 PROCEDURE prompt(t); VALUE t; TEXT t;
00220 BEGIN Outtext(t); Breakoutimage; END;
00230 PROCEDURE display(t1,t2); VALUE t1,t2; TEXT t1,t2;
00240 BEGIN Outtext(t1); Outchar('"'); Outtext(t2); Outchar('"'); Outimage; END;
00250 PROCEDURE inim;
00260 BEGIN Inimage; im.Setpos(1); IF Endfile THEN GOTO out;
00270 END;
00280 INTEGER nproc;
00290 BOOLEAN PROCEDURE testexists(procname); VALUE procname; TEXT procname;
00300 BEGIN upcase(procname);
00310 IF testchar='?' THEN
00320 BEGIN Outtext(procname);
00330 IF nproc = 5 THEN
00340 BEGIN nproc:=0;
00350 Outimage;
00360 END ELSE
00370 BEGIN nproc:=nproc+1;
00380 Outchar(Char(9));
00390 END;
00400 END ELSE testexists:=upcase(p)=procname;
00410 END testexists;
00420
00430 im :- Sysin.Image;
00440 inf:-Sysin; ouf:-Sysout;
00450
00460 start: Outimage; nproc:= 0;
00470 Outtext("Which procedure?"); Breakoutimage;
00480 inim;
00490 p:-Sysin.Image.Sub(1,6);
00500 testchar:=p.Getchar;
00510 IF testchar='?' THEN
00520 BEGIN Outtext("Available procedures:"); Outimage;
00530 END;
00540 Sysin.Setpos(0);
00550
00560 COMMENT Each test on a new page, surrounded by
00570 ! IF testexists("p-name") THEN
00580 ! BEGIN
00590 ! <test code, including declaration of
00600 ! EXTERNAL [<type>] PROCEDURE p-name>
00610 ! END ELSE
00620 ! where p-name is exactly 6 characters from the start of
00630 ! the procedure name;