Listing: 1 2 MODULE AccTest; (* Access Benchmark *) 3 IMPORT InitCompilerMods; 4 FROM DBIndxes IMPORT DBIndex, InitIndex, CloseIndex, FindPositionCh; 5 FROM ModBase3 IMPORT Replace,DBFile,InitDBF,OpenDBF,DefaultFixUp; 6 7 FROM Timing IMPORT BeginTimer, ShowUsage; 8 9 FROM Rand IMPORT RandomInit, RandomCard; 10 (* FROM Lib IMPORT RANDOM;*) 11 IMPORT StringIO; 12 IMPORT StrConv; 13 VAR 14 counter:CARDINAL; 15 string:ARRAY[0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 16 17 PROCEDURE RandStr(VAR S : ARRAY OF CHAR); ***** ^ not supported yet 18 (* Generate a string of random letters with a random length *) 19 VAR 20 I : CARDINAL; 21 Len : CARDINAL; 22 BEGIN 23 Len := 1 + (*RandomCard*)RandomCard(HIGH(S)+1) ; (* random 1 to 30 Len *) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 24 FOR I := 0 TO Len - 1 DO 25 S[I] := CHR((*RandomCard*)RandomCard(26)+65); (* random letters *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 26 END (* for *); 27 FOR I := Len TO HIGH(S) DO (* ModBase requires space padded keys *) ***** ^ undeclared identifier ***** ^ not supported yet 28 S[I] := ' '; (* instead of a 0C terminated string *) ***** ^ not supported yet ***** ^ not supported yet 29 END (* if *); 30 END RandStr; ***** ^ not supported yet 31 32 CONST 33 KeyLen = 30; 34 Buffers = 400; 35 36 TYPE 37 KeyStr = ARRAY [0..KeyLen-1] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 38 39 VAR 40 DBF : DBFile; 41 NDX : DBIndex; 42 Name : KeyStr; ***** ^ not supported yet 43 Found : BOOLEAN; 44 45 BEGIN 46 BeginTimer(); (* BeginTimer() timer counting *) ***** ^ not supported yet ***** ^ not supported yet 47 RandomInit(1); ***** ^ not supported yet ***** ^ not supported yet 48 counter:=0; 49 InitDBF('Modbase.DBF',DBF,0,FALSE,TRUE,FALSE,DefaultFixUp); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 50 IF OpenDBF(DBF) THEN END; ***** ^ not supported yet ***** ^ not supported yet 51 InitIndex("ModBase.NDX", NDX,DBF, Buffers,FALSE,TRUE,TRUE); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 52 REPEAT (* generate random keys *) 53 RandStr(Name); ***** ^ not supported yet ***** ^ not supported yet 54 FindPositionCh(NDX, Name, Found); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 55 INC(counter); ***** ^ undeclared identifier ***** ^ not supported yet 56 UNTIL NOT Found; (* until not in index *) 57 CloseIndex(NDX); ***** ^ not supported yet ***** ^ not supported yet 58 DEC(counter); ***** ^ undeclared identifier ***** ^ not supported yet 59 StrConv.CardinalToStr(counter,0,string); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 60 StringIO.WriteStr(StringIO.outp,string); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 61 StringIO.WriteEol(StringIO.outp,' Keys found'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 62 ShowUsage(' Accsesstest time'); (* display elaped time in seconds *) ***** ^ not supported yet ***** ^ not supported yet 63 END AccTest. 64 63 errors