BEGIN INTEGER I,J,K,L,M,TOT,P,N,Q,W,R,B; INTEGER ARRAY NUM,TAL[1:6],CVS[1:200],CLOSE[1:200]; INTEGER PROCEDURE CVD(X,Y); VALUE X,Y; INTEGER X,Y; BEGIN INTEGER P; P:=ABS(X-Y); IF P>4 THEN P:=8-P; CVD:=P; END; INPUT(5,"DSK",11); OPENFILE(5,"GRASS.DAT"); SELECTINPUT(5); INSYMBOL(I); FOR I:=1 UNTIL 6 DO INSYMBOL(NUM[I]); FOR I:=1 UNTIL 6 DO INSYMBOL(TAL[I]); FOR I:=1 UNTIL 200 DO INSYMBOL(CVS[I]); CLOSEFILE(5); WRITE("INPUT COMPLETED[N]"); OUTPUT(6,"DSK"); OPENFILE(6,"TABLE.ANL",%155); SELECTOUTPUT(6); FOR I:=1 UNTIL 6 DO BEGIN SPACE(50); PRINT (I,2,0); WRITE(" STROKE CHARACTERS"); NEWLINE(5); IF NUM[I]=0 THEN WRITE("[40S] NO CHARACTERS IN THIS SET") ELSE BEGIN WRITE("[5S]CHARACTER[5S]LOCATION[5S]REGION WORD"); FOR J:=1 UNTIL I DO BEGIN WRITE("[5S]VECTOR"); PRINT(J,1,0); END; NEWLINE(2); TOT:= TAL[I]+(NUM[I]-1)*((I+1) DIV 2+1); K:=(I+1)DIV 2 +1; FOR L:= TAL[I] STEP K UNTIL TOT DO BEGIN SPACE(8); B:=GFIELD(CVS[L],0,18); IF B>96 THEN WRITE("&") ELSE SPACE; OUTSYMBOL(B); SPACE(9); PRINT(L,5,0); SPACE(9); FOR J:=8 STEP -1 UNTIL 0 DO OUTSYMBOL(GFIELD(CVS[L],27+J,1)+48); SPACE; FOR M:=1 UNTIL K-1 DO BEGIN SPACE(6); FOR J:=0 UNTIL 5 DO OUTSYMBOL(GFIELD(CVS[L+M],J*3,3)+48); IF(M=K-1 AND ((BOOL(I)AND BOOL(1)))) THEN GOTO LAB; SPACE(8); FOR J:=0 UNTIL 5 DO OUTSYMBOL(GFIELD(CVS[L+M],18+J*3,3)+48); LAB:END; NEWLINE; END; PAGE; WRITE("[20S]CONTOUR VECTOR SEQUENCE DIFFERENCES"); NEWLINE(3); Q:=0; SPACE(10); FOR L:=TAL[I] STEP K UNTIL TOT DO BEGIN SPACE(2); B:=GFIELD(CVS[L],0,18); IF B>96 THEN WRITE("&") ELSE SPACE; END; NEWLINE; SPACE(10); FOR L:=TAL[I] STEP K UNTIL TOT DO BEGIN SPACE(2); OUTSYMBOL(GFIELD(CVS[L],0,18)); END; FOR L:=TAL[I] STEP K UNTIL TOT DO BEGIN NEWLINE; SPACE(8); W:=GFIELD(CVS[L],0,18); IF W>96 THEN WRITE("&") ELSE SPACE; OUTSYMBOL(W); FOR M:=TAL[I] STEP K UNTIL TOT DO BEGIN R:=GFIELD(CVS[M],0,18); P:=0; FOR J:=1 UNTIL K-1 DO BEGIN FOR N:= 0 UNTIL 5 DO P:=P+CVD(GFIELD(CVS[L+J],N*3, 3),GFIELD(CVS[M+J],N*3,3)); IF J=K-1 AND(BOOL(I)AND BOOL(1)) THEN GOTO BAL; FOR N:= 0 UNTIL 5 DO P:=P+CVD(GFIELD(CVS[L+J],18+N*3, 3),GFIELD(CVS[M+J],18+N*3,3)); BAL: END; PRINT(P,2,0); IF P<5 AND M>L THEN BEGIN Q:=Q+1; SFIELD(CLOSE[Q],0,18,W); SFIELD(CLOSE[Q],18,18,R) END; END; END; NEWLINE(3);SPACE(20); IF Q=0 THEN WRITE(" NO CLOSE CONFLICTS") ELSE BEGIN WRITE("CLOSE CONFLICTS") ;NEWLINE(2); FOR J:=1 UNTIL Q DO BEGIN SPACE(19); B:=GFIELD(CLOSE[J],0,18); IF B>96 THEN WRITE("&") ELSE SPACE; OUTSYMBOL(B); WRITE (" CONFLICTS WITH "); B:=GFIELD(CLOSE[J],18,18); IF B>96 THEN WRITE("&") ELSE SPACE; OUTSYMBOL(B); NEWLINE; END; END; END; PAGE; END; CLOSEFILE(6); END;