BIGSETS.LST 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799
  1. Listing:
  2. 1 IMPLEMENTATION MODULE BigSets;
  3. 2 (*
  4. 3 * REPERTOIRE
  5. 4 * Release 1.6
  6. 5 * By Charles Bradford and Cole Brecheen
  7. 6 * (c) Copyright 1985-1992 PMI
  8. 7 * Green Bay, Wisconsin
  9. 8 * All rights reserved
  10. 9 * (414) 468-6040
  11. 10 *
  12. 11 * $Header: D:/logfiles/mods/bigsets.mov 1.3 10 Mar 1991 15:25:08 coleb $
  13. 12 *
  14. 13 *
  15. 14 * Written and contributed by Wilbur C. Andrews.
  16. 15 *
  17. 16 *)
  18. 17
  19. 18
  20. 19 IMPORT ErrorManager;
  21. 20 IMPORT M2Strings;
  22. 21 IMPORT StrEdit;
  23. 22
  24. 23
  25. 24 VAR
  26. 25 Initialized : BOOLEAN;
  27. 26
  28. 27 PROCEDURE Init();
  29. 28 BEGIN
  30. 29 IF Initialized THEN
  31. 30 RETURN;
  32. 31 ELSE
  33. 32 Initialized := TRUE;
  34. 33 END;
  35. 34 ErrorManager.Init();
  36. ***** ^ not supported yet
  37. ***** ^ not supported yet
  38. ***** ^ not supported yet
  39. 35 M2Strings.Init();
  40. ***** ^ not supported yet
  41. ***** ^ not supported yet
  42. ***** ^ not supported yet
  43. 36 StrEdit.Init();
  44. ***** ^ not supported yet
  45. ***** ^ not supported yet
  46. ***** ^ not supported yet
  47. 37
  48. 38 InitSet(DigitSet);
  49. ***** ^ undeclared identifier
  50. ***** ^ undeclared identifier
  51. 39 InitSet(ChSet);
  52. ***** ^ undeclared identifier
  53. ***** ^ undeclared identifier
  54. 40 AppendSet(DigitSet, "{'0'..'9'}");
  55. ***** ^ undeclared identifier
  56. ***** ^ undeclared identifier
  57. ***** ^ not supported yet
  58. 41 AppendSet(ChSet, "{' '..'~'}");
  59. ***** ^ undeclared identifier
  60. ***** ^ undeclared identifier
  61. ***** ^ not supported yet
  62. 42 END Init;
  63. ***** ^ not supported yet
  64. 43
  65. 44
  66. 45 CONST
  67. 46 begin = 1;
  68. 47 Dot = 2;
  69. 48 Quote = 3;
  70. 49 statement = 4;
  71. 50 incomplete = 5;
  72. 51 end = 7;
  73. 52 StartSym = '{';
  74. 53 EndSym = '}';
  75. 54
  76. 55
  77. 56
  78. 57 PROCEDURE SetStuff(n : CARDINAL; VAR ArrayNo, Index : CARDINAL);
  79. 58 BEGIN
  80. 59 IF n=0 THEN
  81. 60 ArrayNo := 0;
  82. 61 Index := 0;
  83. 62 ELSE
  84. 63 ArrayNo := n DIV BitSetSize;
  85. ***** ^ undeclared identifier
  86. 64 Index := n MOD BitSetSize;
  87. ***** ^ undeclared identifier
  88. 65 END;
  89. 66 END SetStuff;
  90. ***** ^ not supported yet
  91. 67
  92. 68 PROCEDURE InitSet(VAR BSet : ARRAY OF BITSET);
  93. ***** ^ undeclared identifier
  94. 69 VAR
  95. 70 n : CARDINAL;
  96. 71 BEGIN
  97. 72 FOR n := 0 TO HIGH(BSet) DO
  98. ***** ^ undeclared identifier
  99. ***** ^ not supported yet
  100. 73 BSet[n] := {};
  101. ***** ^ not supported yet
  102. ***** ^ not supported yet
  103. ***** ^ not supported yet
  104. 74 END;
  105. 75 END InitSet;
  106. ***** ^ not supported yet
  107. 76
  108. 77 PROCEDURE AssignSet(Set1 : ARRAY OF BITSET; VAR Set2 : ARRAY OF
  109. ***** ^ undeclared identifier
  110. 78 BITSET);
  111. ***** ^ undeclared identifier
  112. 79 VAR
  113. 80 a : CARDINAL;
  114. 81 BEGIN
  115. 82 FOR a := 0 TO HIGH(Set1) DO
  116. ***** ^ undeclared identifier
  117. ***** ^ not supported yet
  118. 83 Set2[a] := Set1[a];
  119. ***** ^ not supported yet
  120. ***** ^ not supported yet
  121. ***** ^ not supported yet
  122. ***** ^ not supported yet
  123. 84 END;
  124. 85 END AssignSet;
  125. ***** ^ not supported yet
  126. 86
  127. 87 PROCEDURE Check( ArrayNumber, LastBitSet: CARDINAL );
  128. 88 BEGIN
  129. 89 IF ArrayNumber > LastBitSet THEN
  130. 90 ErrorManager.WARN( "Set element out of range");
  131. ***** ^ not supported yet
  132. ***** ^ not supported yet
  133. ***** ^ not supported yet
  134. 91 END;
  135. 92 END Check;
  136. ***** ^ not supported yet
  137. 93
  138. 94 PROCEDURE InclSet(VAR BSet : ARRAY OF BITSET; n : CARDINAL);
  139. ***** ^ undeclared identifier
  140. 95 VAR
  141. 96 ArrayNo, Index : CARDINAL;
  142. 97 BEGIN
  143. 98 SetStuff(n, ArrayNo, Index);
  144. ***** ^ not supported yet
  145. ***** ^ not supported yet
  146. 99 Check( ArrayNo, HIGH(BSet) );
  147. ***** ^ not supported yet
  148. ***** ^ undeclared identifier
  149. ***** ^ not supported yet
  150. 100 INCL(BSet[ArrayNo], Index);
  151. ***** ^ undeclared identifier
  152. ***** ^ not supported yet
  153. ***** ^ not supported yet
  154. ***** ^ not supported yet
  155. 101 END InclSet;
  156. ***** ^ not supported yet
  157. 102
  158. 103 PROCEDURE ExclSet(VAR BSet : ARRAY OF BITSET; n : CARDINAL);
  159. ***** ^ undeclared identifier
  160. 104 VAR
  161. 105 ArrayNo, Index : CARDINAL;
  162. 106 BEGIN
  163. 107 SetStuff(n, ArrayNo, Index);
  164. ***** ^ not supported yet
  165. ***** ^ not supported yet
  166. 108 Check( ArrayNo, HIGH(BSet) );
  167. ***** ^ not supported yet
  168. ***** ^ undeclared identifier
  169. ***** ^ not supported yet
  170. 109 EXCL(BSet[ArrayNo], Index);
  171. ***** ^ undeclared identifier
  172. ***** ^ not supported yet
  173. ***** ^ not supported yet
  174. ***** ^ not supported yet
  175. 110 END ExclSet;
  176. ***** ^ not supported yet
  177. 111
  178. 112 PROCEDURE InSet(VAR BSet : ARRAY OF BITSET; n : CARDINAL) : BOOLEAN;
  179. ***** ^ undeclared identifier
  180. 113 VAR
  181. 114 ArrayNo, Index : CARDINAL;
  182. 115 bool : BOOLEAN;
  183. 116 BEGIN
  184. 117 SetStuff(n, ArrayNo, Index);
  185. ***** ^ not supported yet
  186. ***** ^ not supported yet
  187. 118 Check( ArrayNo, HIGH(BSet) );
  188. ***** ^ not supported yet
  189. ***** ^ undeclared identifier
  190. ***** ^ not supported yet
  191. 119 bool := Index IN BSet[ArrayNo];
  192. ***** ^ not supported yet
  193. ***** ^ not supported yet
  194. 120 RETURN bool;
  195. 121 END InSet;
  196. ***** ^ not supported yet
  197. 122
  198. 123 PROCEDURE EqualSet(VAR SetOne, SetTwo : ARRAY OF BITSET) : BOOLEAN;
  199. ***** ^ undeclared identifier
  200. 124 VAR
  201. 125 EqualBool : BOOLEAN;
  202. 126 a : CARDINAL;
  203. 127 BEGIN
  204. 128 a := 0;
  205. 129 EqualBool := TRUE;
  206. 130 WHILE (a<=HIGH(SetOne)) AND EqualBool DO
  207. ***** ^ undeclared identifier
  208. ***** ^ not supported yet
  209. 131 EqualBool := SetOne[a]=SetTwo[a];
  210. ***** ^ not supported yet
  211. ***** ^ not supported yet
  212. ***** ^ not supported yet
  213. ***** ^ not supported yet
  214. 132 a := a+1;
  215. 133 END;
  216. 134 RETURN EqualBool;
  217. 135 END EqualSet;
  218. ***** ^ not supported yet
  219. 136
  220. 137
  221. 138 PROCEDURE AppendSet(VAR BSet : ARRAY OF BITSET; st : ARRAY OF CHAR);
  222. ***** ^ undeclared identifier
  223. ***** ^ not supported yet
  224. 139
  225. 140 TYPE
  226. 141 SetStType = ARRAY [0..79] OF CHAR;
  227. ***** ^ not supported yet
  228. ***** ^ not supported yet
  229. 142 StRecord =
  230. 143 RECORD
  231. 144 Item : SetStType;
  232. 145 type : (card, octal, char);
  233. 146 END;
  234. ***** ^ not supported yet
  235. 147
  236. 148 VAR
  237. 149 ch : CHAR;
  238. 150 Error, count : CARDINAL;
  239. 151 CodeSt : SetStType;
  240. ***** ^ not supported yet
  241. 152 StartSt, EndSt : StRecord;
  242. ***** ^ not supported yet
  243. 153 EndBool : BOOLEAN;
  244. 154 message: ARRAY [0..79] OF CHAR;
  245. ***** ^ not supported yet
  246. ***** ^ not supported yet
  247. 155 dumstr: ARRAY [0..0] OF CHAR;
  248. ***** ^ not supported yet
  249. ***** ^ not supported yet
  250. 156
  251. 157 PROCEDURE GetCh();
  252. 158 BEGIN
  253. 159 IF count<=(M2Strings.Length(CodeSt)-1) THEN
  254. ***** ^ not supported yet
  255. ***** ^ not supported yet
  256. ***** ^ not supported yet
  257. 160 ch := CodeSt[count];
  258. ***** ^ not supported yet
  259. ***** ^ not supported yet
  260. 161 INC(count);
  261. ***** ^ undeclared identifier
  262. ***** ^ not supported yet
  263. 162 ELSE
  264. 163 ch := 0C;
  265. 164 END;
  266. 165 END GetCh;
  267. ***** ^ not supported yet
  268. 166
  269. 167 PROCEDURE GetSym();
  270. 168 BEGIN
  271. 169 GetCh();
  272. ***** ^ not supported yet
  273. ***** ^ not supported yet
  274. 170 WHILE ch=' ' DO
  275. 171 GetCh();
  276. ***** ^ not supported yet
  277. ***** ^ not supported yet
  278. 172 END;
  279. 173 END GetSym;
  280. ***** ^ not supported yet
  281. 174
  282. 175 PROCEDURE StToNum(st : ARRAY OF CHAR; base : CARDINAL) : CARDINAL;
  283. ***** ^ not supported yet
  284. 176 VAR
  285. 177 a, c : CARDINAL;
  286. 178 BEGIN
  287. 179 c := 0;
  288. 180 FOR a := 0 TO M2Strings.Length(st)-1 DO
  289. ***** ^ not supported yet
  290. ***** ^ not supported yet
  291. ***** ^ not supported yet
  292. ***** ^ FOR needs integer variable and bounds
  293. 181 c := c*base+(ORD(st[a])-ORD('0'));
  294. ***** ^ undeclared identifier
  295. ***** ^ not supported yet
  296. ***** ^ not supported yet
  297. ***** ^ undeclared identifier
  298. ***** ^ not supported yet
  299. 182 END;
  300. 183 RETURN c;
  301. 184 END StToNum;
  302. ***** ^ not supported yet
  303. 185
  304. 186 PROCEDURE AddToSet(VAR BSet : ARRAY OF BITSET);
  305. ***** ^ undeclared identifier
  306. 187 VAR
  307. 188 StartNum, EndNum : CARDINAL;
  308. 189
  309. 190 PROCEDURE SetNum(st : StRecord) : CARDINAL;
  310. 191 BEGIN
  311. 192 CASE st.type OF
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. 193 card :
  315. ***** ^ not supported yet
  316. 194 RETURN StToNum(st.Item,10);
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. ***** ^ not supported yet
  320. ***** ^ not supported yet
  321. 195 | octal :
  322. ***** ^ not supported yet
  323. 196 RETURN StToNum(st.Item,8);
  324. ***** ^ not supported yet
  325. ***** ^ not supported yet
  326. ***** ^ not supported yet
  327. ***** ^ not supported yet
  328. 197 | char :
  329. ***** ^ not supported yet
  330. 198 RETURN ORD(st.Item[0]);
  331. ***** ^ undeclared identifier
  332. ***** ^ not supported yet
  333. ***** ^ not supported yet
  334. ***** ^ not supported yet
  335. 199 END;
  336. 200 RETURN 0;
  337. 201 END SetNum;
  338. ***** ^ not supported yet
  339. 202
  340. 203 BEGIN
  341. 204 (* AddToSet *)
  342. 205 IF M2Strings.Length(EndSt.Item)>0 THEN
  343. ***** ^ not supported yet
  344. ***** ^ not supported yet
  345. ***** ^ not supported yet
  346. ***** ^ not supported yet
  347. 206 IF M2Strings.Length(StartSt.Item)=0 THEN
  348. ***** ^ not supported yet
  349. ***** ^ not supported yet
  350. ***** ^ not supported yet
  351. ***** ^ not supported yet
  352. 207 InclSet(BSet, SetNum(EndSt));
  353. ***** ^ not supported yet
  354. ***** ^ not supported yet
  355. ***** ^ not supported yet
  356. ***** ^ not supported yet
  357. 208 ELSE
  358. 209 StartNum := SetNum(StartSt);
  359. ***** ^ not supported yet
  360. ***** ^ not supported yet
  361. 210 EndNum := SetNum(EndSt);
  362. ***** ^ not supported yet
  363. ***** ^ not supported yet
  364. 211 WHILE StartNum<=EndNum DO
  365. 212 InclSet(BSet, StartNum);
  366. ***** ^ not supported yet
  367. ***** ^ not supported yet
  368. ***** ^ not supported yet
  369. 213 INC(StartNum);
  370. ***** ^ undeclared identifier
  371. ***** ^ not supported yet
  372. 214 END;
  373. 215 END;
  374. 216 END;
  375. 217 StartSt.Item := 0C;
  376. ***** ^ not supported yet
  377. ***** ^ not supported yet
  378. 218 EndSt.Item := 0C;
  379. ***** ^ not supported yet
  380. ***** ^ not supported yet
  381. 219 END AddToSet;
  382. ***** ^ not supported yet
  383. 220
  384. 221 PROCEDURE AddToNumSt(ch : CHAR; VAR st : ARRAY OF CHAR);
  385. ***** ^ not supported yet
  386. 222 BEGIN
  387. 223 StrEdit.Append(st, ch);
  388. ***** ^ not supported yet
  389. ***** ^ not supported yet
  390. ***** ^ not supported yet
  391. ***** ^ not supported yet
  392. 224 END AddToNumSt;
  393. ***** ^ not supported yet
  394. 225
  395. 226 PROCEDURE DecodeDot();
  396. 227 BEGIN
  397. 228 IF ch='.' THEN
  398. 229 StartSt := EndSt;
  399. ***** ^ not supported yet
  400. ***** ^ not supported yet
  401. 230 EndSt.Item := 0C;
  402. ***** ^ not supported yet
  403. ***** ^ not supported yet
  404. 231 ELSE
  405. 232 Error := Dot;
  406. 233 EndBool := TRUE;
  407. 234 END;
  408. 235 END DecodeDot;
  409. ***** ^ not supported yet
  410. 236
  411. 237 PROCEDURE DecodeNum();
  412. 238 BEGIN
  413. 239 EndSt.type := card;
  414. ***** ^ not supported yet
  415. ***** ^ not supported yet
  416. ***** ^ not supported yet
  417. 240 AddToNumSt(ch, EndSt.Item);
  418. ***** ^ not supported yet
  419. ***** ^ not supported yet
  420. ***** ^ not supported yet
  421. 241 GetCh();
  422. ***** ^ not supported yet
  423. ***** ^ not supported yet
  424. 242 WHILE (ch>='0') AND (ch<='9') DO
  425. 243 AddToNumSt(ch, EndSt.Item);
  426. ***** ^ not supported yet
  427. ***** ^ not supported yet
  428. ***** ^ not supported yet
  429. 244 GetCh();
  430. ***** ^ not supported yet
  431. ***** ^ not supported yet
  432. 245 END;
  433. 246 IF CAP(ch)='C' THEN
  434. ***** ^ undeclared identifier
  435. ***** ^ not supported yet
  436. 247 EndSt.type := octal;
  437. ***** ^ not supported yet
  438. ***** ^ not supported yet
  439. ***** ^ not supported yet
  440. 248 GetCh();
  441. ***** ^ not supported yet
  442. ***** ^ not supported yet
  443. 249 END;
  444. 250 END DecodeNum;
  445. ***** ^ not supported yet
  446. 251
  447. 252 PROCEDURE DecodeQuote(QuoteCh : CHAR);
  448. 253 BEGIN
  449. 254 EndSt.Item[0] := ch;
  450. ***** ^ not supported yet
  451. ***** ^ not supported yet
  452. ***** ^ not supported yet
  453. 255 EndSt.Item[1] := 0C;
  454. ***** ^ not supported yet
  455. ***** ^ not supported yet
  456. ***** ^ not supported yet
  457. 256 EndSt.type := char;
  458. ***** ^ not supported yet
  459. ***** ^ not supported yet
  460. ***** ^ not supported yet
  461. 257 GetCh();
  462. ***** ^ not supported yet
  463. ***** ^ not supported yet
  464. 258 IF ch#QuoteCh THEN
  465. 259 Error := Quote;
  466. 260 EndBool := TRUE;
  467. 261 END;
  468. 262 END DecodeQuote;
  469. ***** ^ not supported yet
  470. 263
  471. 264 PROCEDURE Statement();
  472. 265 BEGIN
  473. 266 (* Statement *)
  474. 267 StartSt.Item := 0C;
  475. ***** ^ not supported yet
  476. ***** ^ not supported yet
  477. 268 EndSt.Item := 0C;
  478. ***** ^ not supported yet
  479. ***** ^ not supported yet
  480. 269 WHILE (NOT EndBool) DO
  481. 270 IF ch="'" THEN
  482. 271 (* Character *)
  483. 272 GetCh();
  484. ***** ^ not supported yet
  485. ***** ^ not supported yet
  486. 273 DecodeQuote("'");
  487. ***** ^ not supported yet
  488. ***** ^ not supported yet
  489. 274 GetSym();
  490. ***** ^ not supported yet
  491. ***** ^ not supported yet
  492. 275 ELSIF ch='"' THEN
  493. 276 (* Character *)
  494. 277 GetCh();
  495. ***** ^ not supported yet
  496. ***** ^ not supported yet
  497. 278 DecodeQuote('"');
  498. ***** ^ not supported yet
  499. ***** ^ not supported yet
  500. 279 GetSym();
  501. ***** ^ not supported yet
  502. ***** ^ not supported yet
  503. 280 ELSIF (ch>='0') AND (ch<='9') THEN
  504. 281 (* CARDINAL OR OCTAL Number *)
  505. 282 DecodeNum();
  506. ***** ^ not supported yet
  507. ***** ^ not supported yet
  508. 283 IF ch=' ' THEN
  509. 284 GetSym();
  510. ***** ^ not supported yet
  511. ***** ^ not supported yet
  512. 285 END;
  513. 286 ELSE
  514. 287 Error := statement;
  515. 288 EndBool := TRUE;
  516. 289 END;
  517. 290 IF ch=0C THEN
  518. 291 Error := incomplete;
  519. 292 (* End of string reached *)
  520. 293 EndBool := TRUE;
  521. 294 ELSIF ch=',' THEN
  522. 295 AddToSet(BSet);
  523. ***** ^ not supported yet
  524. ***** ^ not supported yet
  525. 296 GetSym();
  526. ***** ^ not supported yet
  527. ***** ^ not supported yet
  528. 297 ELSIF ch='.' THEN
  529. 298 GetCh();
  530. ***** ^ not supported yet
  531. ***** ^ not supported yet
  532. 299 DecodeDot();
  533. ***** ^ not supported yet
  534. ***** ^ not supported yet
  535. 300 GetSym();
  536. ***** ^ not supported yet
  537. ***** ^ not supported yet
  538. 301 ELSIF ch=EndSym THEN
  539. 302 EndBool := TRUE;
  540. 303 ELSE
  541. 304 Error := statement;
  542. 305 EndBool := TRUE;
  543. 306 END;
  544. 307 END;
  545. 308 (* WHILE NOT EndBool *)
  546. 309 END Statement;
  547. ***** ^ not supported yet
  548. 310
  549. 311 BEGIN
  550. 312 (* AppendSet *)
  551. 313 StrEdit.AssignStr( st, CodeSt );
  552. ***** ^ not supported yet
  553. ***** ^ not supported yet
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. 314 EndBool := FALSE;
  557. 315 Error := 0;
  558. 316 count := 0;
  559. 317 ch := ' ';
  560. 318 GetSym();
  561. ***** ^ not supported yet
  562. ***** ^ not supported yet
  563. 319 IF ch=StartSym THEN
  564. 320 GetSym();
  565. ***** ^ not supported yet
  566. ***** ^ not supported yet
  567. 321 IF ch#EndSym THEN
  568. 322 Statement();
  569. ***** ^ not supported yet
  570. ***** ^ not supported yet
  571. 323 END;
  572. 324 ELSE
  573. 325 Error := begin;
  574. 326 EndBool := TRUE;
  575. 327 END;
  576. 328 IF (ch=EndSym) AND (Error=0) THEN
  577. 329 AddToSet(BSet);
  578. ***** ^ not supported yet
  579. ***** ^ not supported yet
  580. 330 ELSIF Error=0 THEN
  581. 331 Error := end;
  582. 332 END;
  583. 333 IF Error # 0 THEN
  584. 334 StrEdit.AssignStr( 'Programmer error #', message );
  585. ***** ^ not supported yet
  586. ***** ^ not supported yet
  587. ***** ^ not supported yet
  588. ***** ^ not supported yet
  589. 335 dumstr[0] := CHR(Error);
  590. ***** ^ not supported yet
  591. ***** ^ not supported yet
  592. ***** ^ undeclared identifier
  593. ***** ^ not supported yet
  594. 336 StrEdit.Append( message, dumstr );
  595. ***** ^ not supported yet
  596. ***** ^ not supported yet
  597. ***** ^ not supported yet
  598. ***** ^ not supported yet
  599. 337 StrEdit.Append( message, 'in AppendSet.' );
  600. ***** ^ not supported yet
  601. ***** ^ not supported yet
  602. ***** ^ not supported yet
  603. ***** ^ not supported yet
  604. 338 ErrorManager.WARN( message );
  605. ***** ^ not supported yet
  606. ***** ^ not supported yet
  607. ***** ^ not supported yet
  608. 339 END;
  609. 340 END AppendSet;
  610. ***** ^ not supported yet
  611. 341
  612. 342 PROCEDURE InclCh(VAR ChSet : ARRAY OF BITSET; ch : CHAR);
  613. ***** ^ undeclared identifier
  614. 343 VAR
  615. 344 n : CARDINAL;
  616. 345 BEGIN
  617. 346 n := ORD(ch);
  618. ***** ^ undeclared identifier
  619. ***** ^ not supported yet
  620. 347 InclSet(ChSet, n);
  621. ***** ^ not supported yet
  622. ***** ^ not supported yet
  623. ***** ^ not supported yet
  624. 348 END InclCh;
  625. ***** ^ not supported yet
  626. 349
  627. 350 PROCEDURE ExclCh(VAR ChSet : ARRAY OF BITSET; ch : CHAR);
  628. ***** ^ undeclared identifier
  629. 351 VAR
  630. 352 n : CARDINAL;
  631. 353 BEGIN
  632. 354 n := ORD(ch);
  633. ***** ^ undeclared identifier
  634. ***** ^ not supported yet
  635. 355 ExclSet(ChSet, n);
  636. ***** ^ not supported yet
  637. ***** ^ not supported yet
  638. ***** ^ not supported yet
  639. 356 END ExclCh;
  640. ***** ^ not supported yet
  641. 357
  642. 358 PROCEDURE InChSet(VAR ChSet : ARRAY OF BITSET; ch : CHAR) : BOOLEAN;
  643. ***** ^ undeclared identifier
  644. 359 VAR
  645. 360 n : CARDINAL;
  646. 361 bool : BOOLEAN;
  647. 362 BEGIN
  648. 363 n := ORD(ch);
  649. ***** ^ undeclared identifier
  650. ***** ^ not supported yet
  651. 364 bool := InSet(ChSet,n);
  652. ***** ^ not supported yet
  653. ***** ^ not supported yet
  654. ***** ^ not supported yet
  655. 365 RETURN bool;
  656. 366 END InChSet;
  657. ***** ^ not supported yet
  658. 367
  659. 368 PROCEDURE InTest(SetSt : ARRAY OF CHAR; TestCh : CHAR) : BOOLEAN;
  660. ***** ^ not supported yet
  661. 369 VAR
  662. 370 TestSet : ChSetArray;
  663. ***** ^ undeclared identifier
  664. 371 BEGIN
  665. 372 InitSet(TestSet);
  666. ***** ^ not supported yet
  667. ***** ^ not supported yet
  668. 373 AppendSet(TestSet, SetSt);
  669. ***** ^ not supported yet
  670. ***** ^ not supported yet
  671. ***** ^ not supported yet
  672. 374 RETURN InChSet(TestSet,TestCh);
  673. ***** ^ not supported yet
  674. ***** ^ not supported yet
  675. ***** ^ not supported yet
  676. 375 END InTest;
  677. ***** ^ not supported yet
  678. 376
  679. 377
  680. 378 (* The procedures below assume that SetOne, SetTwo,
  681. 379 and result are all of equal size. The compiler's
  682. 380 range checking option ought to catch violations of
  683. 381 that assumption, but particular implementations may
  684. 382 not. The routines could be rewritten to deal with
  685. 383 sets of unequal size, but that would take a lot more
  686. 384 code and would probably be much slower. *)
  687. 385
  688. 386 PROCEDURE SetUnion( SetOne, SetTwo: ARRAY OF BITSET;
  689. ***** ^ undeclared identifier
  690. 387 VAR result: ARRAY OF BITSET );
  691. ***** ^ undeclared identifier
  692. 388 VAR
  693. 389 cnt, last: CARDINAL;
  694. 390 BEGIN
  695. 391 InitSet( result );
  696. ***** ^ not supported yet
  697. ***** ^ not supported yet
  698. 392 last := HIGH( SetOne );
  699. ***** ^ undeclared identifier
  700. ***** ^ not supported yet
  701. 393 FOR cnt := 0 TO last DO
  702. 394 result[cnt] := SetOne[cnt] + SetTwo[cnt];
  703. ***** ^ not supported yet
  704. ***** ^ not supported yet
  705. ***** ^ not supported yet
  706. ***** ^ not supported yet
  707. ***** ^ not supported yet
  708. ***** ^ not supported yet
  709. 395 END;
  710. 396 END SetUnion;
  711. ***** ^ not supported yet
  712. 397
  713. 398 PROCEDURE SetDifference( SetOne, SetTwo: ARRAY OF
  714. 399 BITSET; VAR result: ARRAY OF BITSET );
  715. ***** ^ undeclared identifier
  716. ***** ^ undeclared identifier
  717. 400 VAR
  718. 401 cnt, last: CARDINAL;
  719. 402 BEGIN
  720. 403 InitSet( result );
  721. ***** ^ not supported yet
  722. ***** ^ not supported yet
  723. 404 last := HIGH( SetOne );
  724. ***** ^ undeclared identifier
  725. ***** ^ not supported yet
  726. 405 FOR cnt := 0 TO last DO
  727. 406 result[cnt] := SetOne[cnt] - SetTwo[cnt];
  728. ***** ^ not supported yet
  729. ***** ^ not supported yet
  730. ***** ^ not supported yet
  731. ***** ^ not supported yet
  732. ***** ^ not supported yet
  733. ***** ^ not supported yet
  734. 407 END;
  735. 408 END SetDifference;
  736. ***** ^ not supported yet
  737. 409
  738. 410 PROCEDURE SetIntersection( SetOne, SetTwo: ARRAY OF
  739. 411 BITSET; VAR result: ARRAY OF BITSET );
  740. ***** ^ undeclared identifier
  741. ***** ^ undeclared identifier
  742. 412 VAR
  743. 413 cnt, last: CARDINAL;
  744. 414 BEGIN
  745. 415 InitSet( result );
  746. ***** ^ not supported yet
  747. ***** ^ not supported yet
  748. 416 last := HIGH( SetOne );
  749. ***** ^ undeclared identifier
  750. ***** ^ not supported yet
  751. 417 FOR cnt := 0 TO last DO
  752. 418 result[cnt] := SetOne[cnt] * SetTwo[cnt];
  753. ***** ^ not supported yet
  754. ***** ^ not supported yet
  755. ***** ^ not supported yet
  756. ***** ^ not supported yet
  757. ***** ^ not supported yet
  758. ***** ^ not supported yet
  759. 419 END;
  760. 420 END SetIntersection;
  761. ***** ^ not supported yet
  762. 421
  763. 422 PROCEDURE SetSymmetricDiff( SetOne, SetTwo: ARRAY OF
  764. 423 BITSET; VAR result: ARRAY OF BITSET );
  765. ***** ^ undeclared identifier
  766. ***** ^ undeclared identifier
  767. 424 VAR
  768. 425 cnt, last: CARDINAL;
  769. 426 BEGIN
  770. 427 InitSet( result );
  771. ***** ^ not supported yet
  772. ***** ^ not supported yet
  773. 428 last := HIGH( SetOne );
  774. ***** ^ undeclared identifier
  775. ***** ^ not supported yet
  776. 429 FOR cnt := 0 TO last DO
  777. 430 result[cnt] := SetOne[cnt] / SetTwo[cnt];
  778. ***** ^ not supported yet
  779. ***** ^ not supported yet
  780. ***** ^ not supported yet
  781. ***** ^ not supported yet
  782. ***** ^ not supported yet
  783. ***** ^ not supported yet
  784. 431 END;
  785. 432 END SetSymmetricDiff;
  786. ***** ^ not supported yet
  787. 433
  788. 434 BEGIN
  789. 435 Initialized := FALSE;
  790. 436 Init();
  791. ***** ^ not supported yet
  792. ***** ^ not supported yet
  793. 437 END BigSets.
  794. ***** ^ not supported yet
  795. 356 errors