| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- Listing:
- 1 MODULE SeqTest;
- 2 (* Sequential Benchmark *)
- 3 IMPORT InitCompilerMods;
- 4
- 5 FROM ModBase3 IMPORT DBFile,InitDBF,OpenDBF,DefaultFixUp;
- 6 FROM DBIndxes IMPORT DBIndex, InitIndex, CloseIndex, FindPositionCh,
- 7 NextRecord, PrevRecord,GoTop,GoBottom;
- 8
- 9 FROM Timing IMPORT BeginTimer, ShowUsage;
- 10
- 11 IMPORT StringIO;
- 12 IMPORT StrConv;
- 13
- 14 CONST
- 15 KeyLen = 30;
- 16
- 17 TYPE
- 18 KeyStr = ARRAY [0..KeyLen-1] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 19
- 20 VAR
- 21 DBF : DBFile;
- 22 NDX : DBIndex;
- 23 DataRef : LONGINT;
- 24 Found : BOOLEAN;
- 25 counter :CARDINAL;
- 26 string :ARRAY[0..79] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 27
- 28 BEGIN
- 29 BeginTimer();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 30 counter:=1;
- 31 (* start timer counting *)
- 32 InitDBF('Modbase.DBF',DBF,0,FALSE,TRUE,FALSE,DefaultFixUp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 33 IF OpenDBF(DBF) THEN END;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 34 InitIndex("ModBase.NDX", NDX,DBF, 30,FALSE,TRUE,TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 35 GoTop(NDX);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 36 (* FindPositionCh(NDX, "", Found); *) (* prepare for sequential access *)
- 37 WHILE NextRecord(NDX, DataRef) DO (* step forward through index *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 38 INC(counter);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 39 END (* while *);
- 40 StrConv.CardinalToStr(counter,0,string);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 41 StringIO.WriteStr(StringIO.outp,string);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 42 StringIO.WriteEol(StringIO.outp,' Keys found');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 43 counter:=1;
- 44 (* should change to gotop, gobottom *)
- 45 (* FindPositionCh(NDX, 377C, Found);*)
- 46 GoBottom(NDX); (* prepare for sequential access *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 47 WHILE PrevRecord(NDX, DataRef) DO (* step backward through index *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 48 INC(counter) ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 49 END (* while *);
- 50 StrConv.CardinalToStr(counter,0,string);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 51 StringIO.WriteStr(StringIO.outp,string);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 52 StringIO.WriteEol(StringIO.outp,' Keys found');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 53 CloseIndex(NDX);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 54 ShowUsage('Seqential test'); (* display elasped time *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 55 END SeqTest.
- 61 errors
|