Listing: 1 2 MODULE Chk; 3 (* 4 * ModBase 5 * Release 3.0 6 * By Don Fletcher & John McMonagle 7 * (c) Copyright 1986 - 1991 PMI 8 * BOX 8402 9 * Green Bay WI 54308-8402 10 * All Rights Reserved 11 * 12 *) 13 14 FROM ModBase3 IMPORT DBFile,InitDBF,OpenDBF,DefaultFixUp; 15 16 FROM DBIndxes IMPORT 17 GoTop, OpenIndex, BuildIndex, DBIndex, NextRecord, PrevRecord, 18 DisposeIndex,InitIndex,CurrentRec,CurrentKeyCh,CurrentKeyN,NumKeyType; 19 20 FROM StrConv IMPORT 21 CardinalToStr; 22 23 FROM EnvironUtils IMPORT ParsedParam; 24 25 FROM StringIO IMPORT 26 ReadStr, WriteStr, WriteEol; 27 28 FROM M2Strings IMPORT 29 Assign, CompareStr,Concat; 30 31 FROM BigSets IMPORT InitSet,InSet,InclSet; 32 33 FROM Storage IMPORT ALLOCATE, DEALLOCATE; 34 35 FROM NumTypes IMPORT Real8; 36 37 FROM StrConv IMPORT RealToStr; ***** ^ duplicate identifier 38 39 IMPORT 40 InitCompilerMods; 41 42 43 CONST 44 inp = 0; 45 outp = 1; 46 prn = 4; 47 stderror = 2; 48 49 VAR 50 dbf : DBFile; 51 ndx : DBIndex; 52 Name: ARRAY[0..70] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 53 PROCEDURE NDXChk(VAR ndx:DBIndex); 54 VAR 55 KeyStr,LastKey : ARRAY[ 0 .. 127 ] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 56 str,string :ARRAY[0..127] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 57 cardrec, Keys :CARDINAL; 58 CurRec : LONGINT; 59 ok, 60 error, 61 dumbool : BOOLEAN; 62 set : POINTER TO ARRAY[0..4095] OF BITSET; ***** ^ not supported yet ***** ^ undeclared identifier 63 64 BEGIN 65 NEW( set); ***** ^ undeclared identifier ***** ^ not supported yet 66 error:=FALSE; 67 Keys:=1; 68 InitSet(set^); ***** ^ not supported yet ***** ^ not supported yet 69 GoTop( ndx ); ***** ^ not supported yet ***** ^ not supported yet 70 InclSet(set^,VAL(CARDINAL,CurrentRec(ndx))); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 71 CurrentKeyCh( ndx, LastKey ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 72 73 WHILE NextRecord( ndx, CurRec ) DO ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 74 cardrec:=VAL(CARDINAL,CurRec); ***** ^ undeclared identifier ***** ^ not supported yet 75 CurrentKeyCh(ndx,KeyStr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 76 IF InSet(set^,cardrec) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 77 THEN 78 error:=TRUE; 79 Concat('duplicate entry for ',KeyStr,str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 80 Concat(str,' record number ',str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 81 CardinalToStr(cardrec,1,string); ***** ^ not supported yet ***** ^ not supported yet 82 Concat(str,string,str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 83 WriteEol(outp,str); ***** ^ not supported yet ***** ^ not supported yet 84 ELSE 85 InclSet(set^,cardrec); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 86 END; 87 INC(Keys); ***** ^ undeclared identifier ***** ^ not supported yet 88 IF CompareStr( LastKey, KeyStr ) > 0 ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 89 THEN 90 WriteEol(outp,'sort error in index'); ***** ^ not supported yet ***** ^ not supported yet 91 error:=TRUE; 92 (* HALT; *) 93 END (*QMLB ***** ^ 'END' expected 94 l 95 ÛB 96 Û“ 61 errors