ACCTESTN.LST 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. Listing:
  2. 1 MODULE AccTestN; (* Access Benchmark *)
  3. 2 IMPORT InitCompilerMods;
  4. 3 FROM DBIndxes IMPORT DBIndex, InitIndex, CloseIndex, FindPositionN;
  5. 4 FROM DBFields IMPORT Replace;
  6. 5 IMPORT ModBase3;
  7. 6 FROM Timing IMPORT BeginTimer, ShowUsage;
  8. 7
  9. 8 FROM Rand IMPORT RandomInit, RandomCard,RandomReal;
  10. 9 IMPORT StringIO;
  11. 10 IMPORT StrConv;
  12. 11 (* FROM Lib IMPORT RAND; *)
  13. 12 VAR
  14. 13 counter:CARDINAL;
  15. 14 string:ARRAY[0..79] OF CHAR;
  16. ***** ^ not supported yet
  17. ***** ^ not supported yet
  18. 15 PROCEDURE RandStr(VAR S : ARRAY OF CHAR);
  19. ***** ^ not supported yet
  20. 16 (* Generate a string of random letters with a random length *)
  21. 17 VAR
  22. 18 key:REAL;
  23. 19 BEGIN
  24. 20 StrConv.RealToStr(RandomReal() * 10000000.0,2,10,S);
  25. ***** ^ not supported yet
  26. ***** ^ not supported yet
  27. ***** ^ not supported yet
  28. ***** ^ not supported yet
  29. ***** ^ not supported yet
  30. 21 END RandStr;
  31. ***** ^ not supported yet
  32. 22
  33. 23
  34. 24 CONST
  35. 25 KeyLen = 10;
  36. 26 Buffers = 400;
  37. 27
  38. 28 TYPE
  39. 29 KeyStr = ARRAY [0..KeyLen-1] OF CHAR;
  40. ***** ^ not supported yet
  41. ***** ^ not supported yet
  42. 30
  43. 31 VAR
  44. 32 NDX : DBIndex;
  45. 33 DBF : ModBase3.DBFile;
  46. ***** ^ not supported yet
  47. 34 Name : KeyStr;
  48. ***** ^ not supported yet
  49. 35 Found : BOOLEAN;
  50. 36
  51. 37 BEGIN
  52. 38 BeginTimer(); (* BeginTimer() timer counting *)
  53. ***** ^ not supported yet
  54. ***** ^ not supported yet
  55. 39 RandomInit(1);
  56. ***** ^ not supported yet
  57. ***** ^ not supported yet
  58. 40 counter:=0;
  59. 41 ModBase3.InitDBF('ModbaseN.dbf',DBF,0,FALSE,FALSE,FALSE,
  60. ***** ^ not supported yet
  61. ***** ^ not supported yet
  62. ***** ^ not supported yet
  63. ***** ^ not supported yet
  64. 42 ModBase3.DefaultFixUp);
  65. ***** ^ not supported yet
  66. ***** ^ not supported yet
  67. 43 IF ModBase3.OpenDBF(DBF) THEN END;
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. 44 InitIndex('ModBasen.NDX',NDX,DBF,Buffers,FALSE,FALSE);
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. ***** ^ not supported yet
  76. ***** ^ not supported yet
  77. 45 REPEAT (* generate random keys *)
  78. 46 RandStr(Name);
  79. ***** ^ not supported yet
  80. ***** ^ not supported yet
  81. 47 FindPositionN(NDX, Name, Found);
  82. ***** ^ not supported yet
  83. ***** ^ not supported yet
  84. ***** ^ not supported yet
  85. ***** ^ not supported yet
  86. 48 INC(counter);
  87. ***** ^ undeclared identifier
  88. ***** ^ not supported yet
  89. 49 UNTIL NOT Found; (* until not in index *)
  90. 50 DEC(counter);
  91. ***** ^ undeclared identifier
  92. ***** ^ not supported yet
  93. 51 CloseIndex(NDX);
  94. ***** ^ not supported yet
  95. ***** ^ not supported yet
  96. 52 StrConv.CardinalToStr(counter,0,string);
  97. ***** ^ not supported yet
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. 53 StringIO.WriteStr(StringIO.outp,string);
  101. ***** ^ not supported yet
  102. ***** ^ not supported yet
  103. ***** ^ not supported yet
  104. ***** ^ not supported yet
  105. ***** ^ not supported yet
  106. 54 StringIO.WriteEol(StringIO.outp,' Keys found');
  107. ***** ^ not supported yet
  108. ***** ^ not supported yet
  109. ***** ^ not supported yet
  110. ***** ^ not supported yet
  111. ***** ^ not supported yet
  112. 55 ShowUsage(' Accsesstest time'); (* display elaped time in seconds *)
  113. ***** ^ not supported yet
  114. ***** ^ not supported yet
  115. 56 END AccTestN.
  116. 57
  117. 58 errors