SEQTEST.LST 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. Listing:
  2. 1 MODULE SeqTest;
  3. 2 (* Sequential Benchmark *)
  4. 3 IMPORT InitCompilerMods;
  5. 4
  6. 5 FROM ModBase3 IMPORT DBFile,InitDBF,OpenDBF,DefaultFixUp;
  7. 6 FROM DBIndxes IMPORT DBIndex, InitIndex, CloseIndex, FindPositionCh,
  8. 7 NextRecord, PrevRecord,GoTop,GoBottom;
  9. 8
  10. 9 FROM Timing IMPORT BeginTimer, ShowUsage;
  11. 10
  12. 11 IMPORT StringIO;
  13. 12 IMPORT StrConv;
  14. 13
  15. 14 CONST
  16. 15 KeyLen = 30;
  17. 16
  18. 17 TYPE
  19. 18 KeyStr = ARRAY [0..KeyLen-1] OF CHAR;
  20. ***** ^ not supported yet
  21. ***** ^ not supported yet
  22. 19
  23. 20 VAR
  24. 21 DBF : DBFile;
  25. 22 NDX : DBIndex;
  26. 23 DataRef : LONGINT;
  27. 24 Found : BOOLEAN;
  28. 25 counter :CARDINAL;
  29. 26 string :ARRAY[0..79] OF CHAR;
  30. ***** ^ not supported yet
  31. ***** ^ not supported yet
  32. 27
  33. 28 BEGIN
  34. 29 BeginTimer();
  35. ***** ^ not supported yet
  36. ***** ^ not supported yet
  37. 30 counter:=1;
  38. 31 (* start timer counting *)
  39. 32 InitDBF('Modbase.DBF',DBF,0,FALSE,TRUE,FALSE,DefaultFixUp);
  40. ***** ^ not supported yet
  41. ***** ^ not supported yet
  42. ***** ^ not supported yet
  43. ***** ^ not supported yet
  44. 33 IF OpenDBF(DBF) THEN END;
  45. ***** ^ not supported yet
  46. ***** ^ not supported yet
  47. 34 InitIndex("ModBase.NDX", NDX,DBF, 30,FALSE,TRUE,TRUE);
  48. ***** ^ not supported yet
  49. ***** ^ not supported yet
  50. ***** ^ not supported yet
  51. ***** ^ not supported yet
  52. ***** ^ not supported yet
  53. 35 GoTop(NDX);
  54. ***** ^ not supported yet
  55. ***** ^ not supported yet
  56. 36 (* FindPositionCh(NDX, "", Found); *) (* prepare for sequential access *)
  57. 37 WHILE NextRecord(NDX, DataRef) DO (* step forward through index *)
  58. ***** ^ not supported yet
  59. ***** ^ not supported yet
  60. ***** ^ not supported yet
  61. 38 INC(counter);
  62. ***** ^ undeclared identifier
  63. ***** ^ not supported yet
  64. 39 END (* while *);
  65. 40 StrConv.CardinalToStr(counter,0,string);
  66. ***** ^ not supported yet
  67. ***** ^ not supported yet
  68. ***** ^ not supported yet
  69. 41 StringIO.WriteStr(StringIO.outp,string);
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. 42 StringIO.WriteEol(StringIO.outp,' Keys found');
  76. ***** ^ not supported yet
  77. ***** ^ not supported yet
  78. ***** ^ not supported yet
  79. ***** ^ not supported yet
  80. ***** ^ not supported yet
  81. 43 counter:=1;
  82. 44 (* should change to gotop, gobottom *)
  83. 45 (* FindPositionCh(NDX, 377C, Found);*)
  84. 46 GoBottom(NDX); (* prepare for sequential access *)
  85. ***** ^ not supported yet
  86. ***** ^ not supported yet
  87. 47 WHILE PrevRecord(NDX, DataRef) DO (* step backward through index *)
  88. ***** ^ not supported yet
  89. ***** ^ not supported yet
  90. ***** ^ not supported yet
  91. 48 INC(counter) ;
  92. ***** ^ undeclared identifier
  93. ***** ^ not supported yet
  94. 49 END (* while *);
  95. 50 StrConv.CardinalToStr(counter,0,string);
  96. ***** ^ not supported yet
  97. ***** ^ not supported yet
  98. ***** ^ not supported yet
  99. 51 StringIO.WriteStr(StringIO.outp,string);
  100. ***** ^ not supported yet
  101. ***** ^ not supported yet
  102. ***** ^ not supported yet
  103. ***** ^ not supported yet
  104. ***** ^ not supported yet
  105. 52 StringIO.WriteEol(StringIO.outp,' Keys found');
  106. ***** ^ not supported yet
  107. ***** ^ not supported yet
  108. ***** ^ not supported yet
  109. ***** ^ not supported yet
  110. ***** ^ not supported yet
  111. 53 CloseIndex(NDX);
  112. ***** ^ not supported yet
  113. ***** ^ not supported yet
  114. 54 ShowUsage('Seqential test'); (* display elasped time *)
  115. ***** ^ not supported yet
  116. ***** ^ not supported yet
  117. 55 END SeqTest.
  118. 61 errors