| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- Listing:
- 1 MODULE AccTestN; (* Access Benchmark *)
- 2 IMPORT InitCompilerMods;
- 3 FROM DBIndxes IMPORT DBIndex, InitIndex, CloseIndex, FindPositionN;
- 4 FROM DBFields IMPORT Replace;
- 5 IMPORT ModBase3;
- 6 FROM Timing IMPORT BeginTimer, ShowUsage;
- 7
- 8 FROM Rand IMPORT RandomInit, RandomCard,RandomReal;
- 9 IMPORT StringIO;
- 10 IMPORT StrConv;
- 11 (* FROM Lib IMPORT RAND; *)
- 12 VAR
- 13 counter:CARDINAL;
- 14 string:ARRAY[0..79] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 15 PROCEDURE RandStr(VAR S : ARRAY OF CHAR);
- ***** ^ not supported yet
- 16 (* Generate a string of random letters with a random length *)
- 17 VAR
- 18 key:REAL;
- 19 BEGIN
- 20 StrConv.RealToStr(RandomReal() * 10000000.0,2,10,S);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 21 END RandStr;
- ***** ^ not supported yet
- 22
- 23
- 24 CONST
- 25 KeyLen = 10;
- 26 Buffers = 400;
- 27
- 28 TYPE
- 29 KeyStr = ARRAY [0..KeyLen-1] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 30
- 31 VAR
- 32 NDX : DBIndex;
- 33 DBF : ModBase3.DBFile;
- ***** ^ not supported yet
- 34 Name : KeyStr;
- ***** ^ not supported yet
- 35 Found : BOOLEAN;
- 36
- 37 BEGIN
- 38 BeginTimer(); (* BeginTimer() timer counting *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 39 RandomInit(1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 40 counter:=0;
- 41 ModBase3.InitDBF('ModbaseN.dbf',DBF,0,FALSE,FALSE,FALSE,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 42 ModBase3.DefaultFixUp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 43 IF ModBase3.OpenDBF(DBF) THEN END;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 44 InitIndex('ModBasen.NDX',NDX,DBF,Buffers,FALSE,FALSE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 45 REPEAT (* generate random keys *)
- 46 RandStr(Name);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 47 FindPositionN(NDX, Name, Found);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 48 INC(counter);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 49 UNTIL NOT Found; (* until not in index *)
- 50 DEC(counter);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 51 CloseIndex(NDX);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 52 StrConv.CardinalToStr(counter,0,string);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 53 StringIO.WriteStr(StringIO.outp,string);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 54 StringIO.WriteEol(StringIO.outp,' Keys found');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 55 ShowUsage(' Accsesstest time'); (* display elaped time in seconds *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 56 END AccTestN.
- 57
- 58 errors
|