| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- 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
|