TABLES.LST 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732
  1. Listing:
  2. 1 IMPLEMENTATION MODULE Tables;
  3. 2 (*
  4. 3 * ModBase
  5. 4 * Release 3.0
  6. 5 * (c) Copyright 1986 - 1991 PMI
  7. 6 * P.O. Box 8402
  8. 7 * Green Bay Wi 53308
  9. 8 * All Rights Reserved
  10. 9 * by Ed Ross
  11. 10 *)
  12. 11
  13. 12
  14. 13 FROM ScrnTypes IMPORT DisplayFrame,InputFieldRecord,InitField,
  15. 14 IntCode,StringCode,RealCode,DispCode,GroupMember,InitDisplayFrame,
  16. 15 ImageElement,InputFieldPtr;
  17. 16 FROM ScrnUtl1 IMPORT PutFieldRec,PutFrameLists,GetImageRec,PutFieldRec,
  18. ***** ^ duplicate identifier
  19. 17 GetImageRec,PutFieldImageRec,GetFieldPtr;
  20. ***** ^ duplicate identifier
  21. 18 FROM ScrnUtl2 IMPORT CreateImageElement,AddImageElement,CloseDisplayFrame;
  22. 19 FROM StrEdit IMPORT SetLength,OverWrite;
  23. 20 FROM GenLists IMPORT NewList,DisposeList,GetElmt,GetElmtAdr,ListInsert,
  24. 21 ListInsertAdr,ListLength,GenList,SortList,ShellSortList;
  25. 22 FROM SYSTEM IMPORT SIZE,TSIZE, ADR,ADDRESS;
  26. 23 FROM FramePainter IMPORT ShowDisplayFrame;
  27. 24 FROM M2Strings IMPORT Length,Assign;
  28. 25 FROM NumTypes IMPORT REALToReal8;
  29. 26 FROM StrConv IMPORT IntegerToStr,RealToStr,StrToInteger,StrToReal;
  30. 27 FROM VStorage IMPORT DosAlloc,DosDealloc;
  31. 28 FROM LowLevel IMPORT Fill;
  32. 29 FROM ControlUtils IMPORT Control;
  33. 30 IMPORT VWindows;
  34. 31 IMPORT MsColors;
  35. 32 TYPE
  36. 33 Table = POINTER TO TableRec;
  37. ***** ^ undeclared identifier
  38. 34 TableRec = RECORD
  39. 35 DF : DisplayFrame;
  40. 36 Choice : ARRAY[0..15] OF CHAR; (* choice fields *)
  41. ***** ^ not supported yet
  42. ***** ^ not supported yet
  43. 37 RowDef : GenList;
  44. 38 NumberOfRows,
  45. 39 NumberOfCols : CARDINAL;
  46. 40 END;
  47. ***** ^ not supported yet
  48. 41
  49. 42 ColumDef = RECORD
  50. 43 InField : InputFieldRecord;
  51. 44 X : CARDINAL;
  52. 45 Width : CARDINAL;
  53. 46 Choice : ARRAY[0..15] OF CHAR;
  54. ***** ^ not supported yet
  55. ***** ^ not supported yet
  56. 47 Title : ARRAY[0..40] OF CHAR; (* caption for top of field *)
  57. ***** ^ not supported yet
  58. ***** ^ not supported yet
  59. 48 END;
  60. ***** ^ not supported yet
  61. 49
  62. 50
  63. 51 (* these procedures are used to define the table *)
  64. 52 PROCEDURE DefineTextCol(VAR T:Table; X, Width : CARDINAL;
  65. 53 Title : ARRAY OF CHAR; DisplayOnly : BOOLEAN);
  66. ***** ^ not supported yet
  67. 54 VAR
  68. 55 Col : ColumDef;
  69. ***** ^ not supported yet
  70. 56 BEGIN
  71. 57 InitField(Col.InField);
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. 58 IF DisplayOnly
  76. 59 THEN Col.InField.typ := DispCode
  77. ***** ^ not supported yet
  78. ***** ^ not supported yet
  79. ***** ^ not supported yet
  80. ***** ^ not supported yet
  81. 60 ELSE Col.InField.typ := StringCode;
  82. ***** ^ not supported yet
  83. ***** ^ not supported yet
  84. ***** ^ not supported yet
  85. ***** ^ not supported yet
  86. 61 END;
  87. 62 Col.X := X;
  88. ***** ^ not supported yet
  89. ***** ^ not supported yet
  90. 63 Col.Width := Width;
  91. ***** ^ not supported yet
  92. ***** ^ not supported yet
  93. 64 Assign( Title,Col.Title);
  94. ***** ^ not supported yet
  95. ***** ^ not supported yet
  96. ***** ^ not supported yet
  97. ***** ^ not supported yet
  98. 65 ListInsert(Col,1,T^.RowDef,80);
  99. ***** ^ not supported yet
  100. ***** ^ not supported yet
  101. ***** ^ not supported yet
  102. ***** ^ not supported yet
  103. ***** ^ not supported yet
  104. 66
  105. 67 END DefineTextCol;
  106. ***** ^ not supported yet
  107. 68
  108. 69 PROCEDURE DefineGroupCol(VAR T:Table; X,Width : CARDINAL; Title : ARRAY OF CHAR;
  109. ***** ^ not supported yet
  110. 70 Choice : ARRAY OF CHAR; MenuKey : CARDINAL; NbrOfChoice, ThisChoice : CARDINAL;
  111. ***** ^ not supported yet
  112. 71 SelectDefault: BOOLEAN );
  113. 72 VAR
  114. 73 Col : ColumDef;
  115. ***** ^ not supported yet
  116. 74 BEGIN
  117. 75 InitField(Col.InField);
  118. ***** ^ not supported yet
  119. ***** ^ not supported yet
  120. ***** ^ not supported yet
  121. 76 Col.InField.typ := GroupMember;
  122. ***** ^ not supported yet
  123. ***** ^ not supported yet
  124. ***** ^ not supported yet
  125. ***** ^ not supported yet
  126. 77 Col.InField.MenuKey := MenuKey;
  127. ***** ^ not supported yet
  128. ***** ^ not supported yet
  129. ***** ^ not supported yet
  130. 78 Col.InField.GroupSize := NbrOfChoice;
  131. ***** ^ not supported yet
  132. ***** ^ not supported yet
  133. ***** ^ not supported yet
  134. 79 Col.InField.GroupID := ThisChoice;
  135. ***** ^ not supported yet
  136. ***** ^ not supported yet
  137. ***** ^ not supported yet
  138. 80 Col.InField.selected := SelectDefault;
  139. ***** ^ not supported yet
  140. ***** ^ not supported yet
  141. ***** ^ not supported yet
  142. 81 Assign(Choice,Col.InField.fnam );
  143. ***** ^ not supported yet
  144. ***** ^ not supported yet
  145. ***** ^ not supported yet
  146. ***** ^ not supported yet
  147. ***** ^ not supported yet
  148. 82 Col.X := X;
  149. ***** ^ not supported yet
  150. ***** ^ not supported yet
  151. 83 Col.Width := Width;
  152. ***** ^ not supported yet
  153. ***** ^ not supported yet
  154. 84 Assign( Choice,Col.Choice); (* default text *)
  155. ***** ^ not supported yet
  156. ***** ^ not supported yet
  157. ***** ^ not supported yet
  158. ***** ^ not supported yet
  159. 85 Assign( Title,Col.Title );
  160. ***** ^ not supported yet
  161. ***** ^ not supported yet
  162. ***** ^ not supported yet
  163. ***** ^ not supported yet
  164. 86 ListInsert(Col,1,T^.RowDef,80);
  165. ***** ^ not supported yet
  166. ***** ^ not supported yet
  167. ***** ^ not supported yet
  168. ***** ^ not supported yet
  169. ***** ^ not supported yet
  170. 87 END DefineGroupCol;
  171. ***** ^ not supported yet
  172. 88
  173. 89 PROCEDURE DefineIntegerCol(VAR T:Table; X,Width : CARDINAL; Title : ARRAY OF CHAR;
  174. ***** ^ not supported yet
  175. 90 Min, Max : LONGINT);
  176. 91 VAR
  177. 92 Col : ColumDef;
  178. ***** ^ not supported yet
  179. 93 BEGIN
  180. 94 InitField(Col.InField);
  181. ***** ^ not supported yet
  182. ***** ^ not supported yet
  183. ***** ^ not supported yet
  184. 95 Col.InField.typ := IntCode;
  185. ***** ^ not supported yet
  186. ***** ^ not supported yet
  187. ***** ^ not supported yet
  188. ***** ^ not supported yet
  189. 96 Col.InField.iMax := Max;
  190. ***** ^ not supported yet
  191. ***** ^ not supported yet
  192. ***** ^ not supported yet
  193. 97 Col.InField.iMin := Min;
  194. ***** ^ not supported yet
  195. ***** ^ not supported yet
  196. ***** ^ not supported yet
  197. 98 Col.X := X;
  198. ***** ^ not supported yet
  199. ***** ^ not supported yet
  200. 99 Col.Width := Width;
  201. ***** ^ not supported yet
  202. ***** ^ not supported yet
  203. 100 Assign( Title,Col.Title );
  204. ***** ^ not supported yet
  205. ***** ^ not supported yet
  206. ***** ^ not supported yet
  207. ***** ^ not supported yet
  208. 101 ListInsert(Col,1,T^.RowDef,80);
  209. ***** ^ not supported yet
  210. ***** ^ not supported yet
  211. ***** ^ not supported yet
  212. ***** ^ not supported yet
  213. ***** ^ not supported yet
  214. 102 END DefineIntegerCol;
  215. ***** ^ not supported yet
  216. 103
  217. 104
  218. 105 PROCEDURE DefineRealCol(VAR T:Table; X,Width : CARDINAL; Title : ARRAY OF CHAR;
  219. ***** ^ not supported yet
  220. 106 Min, Max : REAL);
  221. 107 VAR
  222. 108 Col : ColumDef;
  223. ***** ^ not supported yet
  224. 109 BEGIN
  225. 110 InitField(Col.InField);
  226. ***** ^ not supported yet
  227. ***** ^ not supported yet
  228. ***** ^ not supported yet
  229. 111 Col.InField.typ := RealCode;
  230. ***** ^ not supported yet
  231. ***** ^ not supported yet
  232. ***** ^ not supported yet
  233. ***** ^ not supported yet
  234. 112 Col.InField.rMax := REALToReal8(Max);
  235. ***** ^ not supported yet
  236. ***** ^ not supported yet
  237. ***** ^ not supported yet
  238. ***** ^ not supported yet
  239. ***** ^ not supported yet
  240. 113 Col.InField.rMin := REALToReal8(Min);
  241. ***** ^ not supported yet
  242. ***** ^ not supported yet
  243. ***** ^ not supported yet
  244. ***** ^ not supported yet
  245. ***** ^ not supported yet
  246. 114 Col.InField.decimalPlace := 2;
  247. ***** ^ not supported yet
  248. ***** ^ not supported yet
  249. ***** ^ not supported yet
  250. 115
  251. 116 Col.X := X;
  252. ***** ^ not supported yet
  253. ***** ^ not supported yet
  254. 117 Col.Width := Width;
  255. ***** ^ not supported yet
  256. ***** ^ not supported yet
  257. 118 Assign( Title,Col.Title );
  258. ***** ^ not supported yet
  259. ***** ^ not supported yet
  260. ***** ^ not supported yet
  261. ***** ^ not supported yet
  262. 119 ListInsert(Col,1,T^.RowDef,80);
  263. ***** ^ not supported yet
  264. ***** ^ not supported yet
  265. ***** ^ not supported yet
  266. ***** ^ not supported yet
  267. ***** ^ not supported yet
  268. 120
  269. 121 END DefineRealCol;
  270. ***** ^ not supported yet
  271. 122
  272. 123
  273. 124 PROCEDURE DefineTable(VAR T:Table; Caption : ARRAY OF CHAR);
  274. ***** ^ not supported yet
  275. 125 BEGIN
  276. 126 DosAlloc(T,TSIZE(TableRec)); (* allocate the table *)
  277. ***** ^ not supported yet
  278. ***** ^ not supported yet
  279. ***** ^ not supported yet
  280. ***** ^ not supported yet
  281. 127 InitDisplayFrame(T^.DF,VWindows.CurrentWindow); (* inint the display Frame*)
  282. ***** ^ not supported yet
  283. ***** ^ not supported yet
  284. ***** ^ not supported yet
  285. ***** ^ not supported yet
  286. ***** ^ not supported yet
  287. 128 T^.DF^.action := 'I';
  288. ***** ^ not supported yet
  289. ***** ^ not supported yet
  290. ***** ^ not supported yet
  291. 129 T^.DF^.headline := 3; (* the title shouldn't scroll *)
  292. ***** ^ not supported yet
  293. ***** ^ not supported yet
  294. ***** ^ not supported yet
  295. 130 T^.DF^.selfor := MsColors.brightwhite;
  296. ***** ^ not supported yet
  297. ***** ^ not supported yet
  298. ***** ^ not supported yet
  299. ***** ^ not supported yet
  300. ***** ^ not supported yet
  301. 131 Assign( Caption,T^.DF^.Caption);
  302. ***** ^ not supported yet
  303. ***** ^ not supported yet
  304. ***** ^ not supported yet
  305. ***** ^ not supported yet
  306. ***** ^ not supported yet
  307. 132 T^.DF^.ClearAfter := TRUE;
  308. ***** ^ not supported yet
  309. ***** ^ not supported yet
  310. ***** ^ not supported yet
  311. 133 NewList( T^.DF^.FieldList );
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. ***** ^ not supported yet
  315. ***** ^ not supported yet
  316. 134 PutFrameLists( T^.DF );
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. ***** ^ not supported yet
  320. 135 (*Make sure the new FieldList gets inserted into
  321. 136 TheFrame's .self list. Stole this from Cole???? *)
  322. 137 NewList(T^.RowDef);
  323. ***** ^ not supported yet
  324. ***** ^ not supported yet
  325. ***** ^ not supported yet
  326. 138 END DefineTable;
  327. ***** ^ not supported yet
  328. 139
  329. 140
  330. 141
  331. 142 PROCEDURE PutInOrder( Adr1 : ADDRESS; S1 : CARDINAL;
  332. 143 Adr2 : ADDRESS; S2:CARDINAL) : INTEGER;
  333. 144 (* before building the table make sure the thing is in correct order *)
  334. 145 VAR
  335. 146 C1, C2 : POINTER TO ColumDef;
  336. ***** ^ not supported yet
  337. 147 BEGIN
  338. 148 C1 := Adr1;
  339. ***** ^ not supported yet
  340. ***** ^ not supported yet
  341. 149 C2 := Adr2;
  342. ***** ^ not supported yet
  343. ***** ^ not supported yet
  344. 150 IF C1^.X > C2^.X
  345. ***** ^ not supported yet
  346. ***** ^ not supported yet
  347. ***** ^ not supported yet
  348. ***** ^ not supported yet
  349. 151 THEN RETURN 1
  350. 152 ELSE RETURN -1
  351. 153 END;
  352. 154 END PutInOrder;
  353. ***** ^ not supported yet
  354. 155
  355. 156
  356. 157 PROCEDURE BuildTable(VAR T:Table; NbrRows : CARDINAL);
  357. 158 (* this routine will go through the row list of the table and build the*)
  358. 159 (* The table *)
  359. 160 VAR J : CARDINAL;
  360. 161 Row : CARDINAL;
  361. 162 Col : POINTER TO ColumDef;
  362. ***** ^ not supported yet
  363. 163 TmpCol : ColumDef;
  364. ***** ^ not supported yet
  365. 164 Size,Code : CARDINAL;
  366. 165 ImgNbr : CARDINAL;
  367. 166 Str : ARRAY[0..80] OF CHAR;
  368. ***** ^ not supported yet
  369. ***** ^ not supported yet
  370. 167 TmpRec : ImageElement;
  371. 168 BEGIN
  372. 169
  373. 170 WITH T^ DO
  374. ***** ^ not supported yet
  375. 171 ShellSortList(RowDef,PutInOrder); (* should have been defined in order *)
  376. ***** ^ not supported yet
  377. ***** ^ undeclared identifier
  378. ***** ^ not supported yet
  379. 172 (* but make sure - *)
  380. 173
  381. 174 NumberOfRows := NbrRows;
  382. ***** ^ undeclared identifier
  383. 175 NumberOfCols := ListLength(RowDef);
  384. ***** ^ undeclared identifier
  385. ***** ^ not supported yet
  386. ***** ^ undeclared identifier
  387. 176
  388. 177 (* at the top of the table put the title rows *)
  389. 178 FOR J := 1 TO ListLength(RowDef) DO (* add title row *)
  390. ***** ^ not supported yet
  391. ***** ^ undeclared identifier
  392. 179 GetElmt(RowDef,J,TmpCol,Code); (* get a copy of the record *)
  393. ***** ^ not supported yet
  394. ***** ^ undeclared identifier
  395. ***** ^ not supported yet
  396. ***** ^ not supported yet
  397. 180 TmpCol.InField.typ := 'D'; (* make it a display only *)
  398. ***** ^ not supported yet
  399. ***** ^ not supported yet
  400. ***** ^ not supported yet
  401. 181 CreateImageElement(TmpRec,TmpCol.X,2,DF^.normfor,DF^.normbak,
  402. ***** ^ not supported yet
  403. ***** ^ not supported yet
  404. ***** ^ not supported yet
  405. ***** ^ not supported yet
  406. ***** ^ undeclared identifier
  407. ***** ^ not supported yet
  408. ***** ^ undeclared identifier
  409. ***** ^ not supported yet
  410. 182 DF^.normatrb,ListLength(DF^.FieldList)+1,TmpCol.Title);
  411. ***** ^ undeclared identifier
  412. ***** ^ not supported yet
  413. ***** ^ not supported yet
  414. ***** ^ undeclared identifier
  415. ***** ^ not supported yet
  416. ***** ^ not supported yet
  417. ***** ^ not supported yet
  418. 183
  419. 184 AddImageElement(DF,TmpRec,ImgNbr);
  420. ***** ^ not supported yet
  421. ***** ^ undeclared identifier
  422. ***** ^ not supported yet
  423. ***** ^ not supported yet
  424. 185 TmpCol.InField.ImageNum := ImgNbr;
  425. ***** ^ not supported yet
  426. ***** ^ not supported yet
  427. ***** ^ not supported yet
  428. 186 PutFieldRec(TmpCol.InField,DF,65535); (* stick at end*)
  429. ***** ^ not supported yet
  430. ***** ^ not supported yet
  431. ***** ^ not supported yet
  432. ***** ^ undeclared identifier
  433. ***** ^ not supported yet
  434. 187 END;
  435. 188 (* add the elemets to the table *)
  436. 189
  437. 190 FOR Row := 1 TO NbrRows DO (* for each row in the table *)
  438. 191 FOR J := 1 TO ListLength(RowDef) DO (* for each colum in row *)
  439. ***** ^ not supported yet
  440. ***** ^ undeclared identifier
  441. 192 GetElmtAdr(RowDef,J,Col,Size,Code);
  442. ***** ^ not supported yet
  443. ***** ^ undeclared identifier
  444. ***** ^ not supported yet
  445. ***** ^ not supported yet
  446. 193 Fill(ADR(Str),SIZE(Str),' '); (* blank fill the input string *)
  447. ***** ^ not supported yet
  448. ***** ^ not supported yet
  449. ***** ^ not supported yet
  450. ***** ^ not supported yet
  451. ***** ^ not supported yet
  452. ***** ^ not supported yet
  453. 194 SetLength(Str,Col^.Width);
  454. ***** ^ not supported yet
  455. ***** ^ not supported yet
  456. ***** ^ not supported yet
  457. ***** ^ not supported yet
  458. 195 IF Col^.InField.typ = GroupMember
  459. ***** ^ not supported yet
  460. ***** ^ not supported yet
  461. ***** ^ not supported yet
  462. ***** ^ not supported yet
  463. 196 THEN
  464. 197 Assign(Col^.Choice,Str );
  465. ***** ^ not supported yet
  466. ***** ^ not supported yet
  467. ***** ^ not supported yet
  468. ***** ^ not supported yet
  469. 198 END;
  470. 199 CreateImageElement(TmpRec,Col^.X,Row+3,DF^.normfor,DF^.normbak,
  471. ***** ^ not supported yet
  472. ***** ^ not supported yet
  473. ***** ^ not supported yet
  474. ***** ^ not supported yet
  475. ***** ^ undeclared identifier
  476. ***** ^ not supported yet
  477. ***** ^ undeclared identifier
  478. ***** ^ not supported yet
  479. 200 DF^.normatrb,ListLength(DF^.FieldList)+1,Str);
  480. ***** ^ undeclared identifier
  481. ***** ^ not supported yet
  482. ***** ^ not supported yet
  483. ***** ^ undeclared identifier
  484. ***** ^ not supported yet
  485. ***** ^ not supported yet
  486. 201
  487. 202 AddImageElement(DF,TmpRec,ImgNbr);
  488. ***** ^ not supported yet
  489. ***** ^ undeclared identifier
  490. ***** ^ not supported yet
  491. ***** ^ not supported yet
  492. 203 Col^.InField.ImageNum := ImgNbr;
  493. ***** ^ not supported yet
  494. ***** ^ not supported yet
  495. ***** ^ not supported yet
  496. 204 PutFieldRec(Col^.InField,DF,65535); (* stick at end*)
  497. ***** ^ not supported yet
  498. ***** ^ not supported yet
  499. ***** ^ not supported yet
  500. ***** ^ undeclared identifier
  501. ***** ^ not supported yet
  502. 205 END; (* end of for each col *)
  503. 206 END; (* end for each row *)
  504. 207 END; (* end with table *)
  505. ***** ^ not supported yet
  506. 208
  507. 209
  508. 210 END BuildTable;
  509. ***** ^ not supported yet
  510. 211
  511. 212 PROCEDURE ShowTable(T : Table;X1,Y1,X2,Y2: CARDINAL);
  512. 213 BEGIN
  513. 214 ShowDisplayFrame(T^.DF,X1,Y1,X2,Y2);
  514. ***** ^ not supported yet
  515. ***** ^ not supported yet
  516. ***** ^ not supported yet
  517. ***** ^ not supported yet
  518. 215 END ShowTable;
  519. ***** ^ not supported yet
  520. 216
  521. 217 PROCEDURE ControlTable(VAR T:Table;X1,Y1,X2,Y2: CARDINAL);
  522. 218 BEGIN
  523. 219 ShowDisplayFrame(T^.DF,X1,Y1,X2,Y2);
  524. ***** ^ not supported yet
  525. ***** ^ not supported yet
  526. ***** ^ not supported yet
  527. ***** ^ not supported yet
  528. 220 Control(T^.DF);
  529. ***** ^ not supported yet
  530. ***** ^ not supported yet
  531. ***** ^ not supported yet
  532. 221 END ControlTable;
  533. ***** ^ not supported yet
  534. 222
  535. 223 PROCEDURE DeleteTable(VAR T:Table);
  536. 224 BEGIN
  537. 225 CloseDisplayFrame(T^.DF);
  538. ***** ^ not supported yet
  539. ***** ^ not supported yet
  540. ***** ^ not supported yet
  541. 226 DisposeList(T^.RowDef);
  542. ***** ^ not supported yet
  543. ***** ^ not supported yet
  544. ***** ^ not supported yet
  545. 227 DosDealloc(T,TSIZE(TableRec));
  546. ***** ^ not supported yet
  547. ***** ^ not supported yet
  548. ***** ^ not supported yet
  549. ***** ^ not supported yet
  550. 228
  551. 229 END DeleteTable;
  552. ***** ^ not supported yet
  553. 230
  554. 231 PROCEDURE PutCell(VAR T:Table; X,Y : CARDINAL; Cell : CellValue);
  555. ***** ^ undeclared identifier
  556. 232 (* fill a value in table - the X and Y here refer to the cell numbers *)
  557. 233 (* not to the placement on the screen *)
  558. 234 VAR
  559. 235 FieldNbr : CARDINAL;
  560. 236 Image : ImageElement;
  561. 237 FldPtr : InputFieldPtr;
  562. 238 B : BOOLEAN;
  563. 239 LL : CARDINAL;
  564. 240 Str : ARRAY[0..80] OF CHAR; (* must maintain the original length*)
  565. ***** ^ not supported yet
  566. ***** ^ not supported yet
  567. 241 BEGIN
  568. 242 LL := ListLength(T^.RowDef);
  569. ***** ^ not supported yet
  570. ***** ^ not supported yet
  571. ***** ^ not supported yet
  572. 243 FieldNbr := ((Y) * LL) + X ; (* compute field nbr*)
  573. 244 GetImageRec(T^.DF,FieldNbr,Image);
  574. ***** ^ not supported yet
  575. ***** ^ not supported yet
  576. ***** ^ not supported yet
  577. ***** ^ not supported yet
  578. 245 GetFieldPtr(T^.DF,FieldNbr,FldPtr);
  579. ***** ^ not supported yet
  580. ***** ^ not supported yet
  581. ***** ^ not supported yet
  582. ***** ^ not supported yet
  583. 246 CASE FldPtr^.typ OF
  584. ***** ^ not supported yet
  585. ***** ^ not supported yet
  586. 247 StringCode,DispCode :
  587. ***** ^ not supported yet
  588. ***** ^ not supported yet
  589. 248 Fill(ADR(Str),SIZE(Str),' ');
  590. ***** ^ not supported yet
  591. ***** ^ not supported yet
  592. ***** ^ not supported yet
  593. ***** ^ not supported yet
  594. ***** ^ not supported yet
  595. ***** ^ not supported yet
  596. 249 OverWrite(Cell.Str,Str,0); (* keep the length of the orignal*)
  597. ***** ^ not supported yet
  598. ***** ^ not supported yet
  599. ***** ^ not supported yet
  600. ***** ^ not supported yet
  601. ***** ^ not supported yet
  602. 250 SetLength(Str,Length(Image.text)+1);
  603. ***** ^ not supported yet
  604. ***** ^ not supported yet
  605. ***** ^ not supported yet
  606. ***** ^ not supported yet
  607. ***** ^ not supported yet
  608. ***** ^ not supported yet
  609. 251 Assign( Str,Image.text);
  610. ***** ^ not supported yet
  611. ***** ^ not supported yet
  612. ***** ^ not supported yet
  613. ***** ^ not supported yet
  614. 252 |IntCode : IntegerToStr(Cell.I,Length(Image.text),Image.text);
  615. ***** ^ not supported yet
  616. ***** ^ not supported yet
  617. ***** ^ not supported yet
  618. ***** ^ not supported yet
  619. ***** ^ not supported yet
  620. ***** ^ not supported yet
  621. ***** ^ not supported yet
  622. ***** ^ not supported yet
  623. ***** ^ not supported yet
  624. 253 |RealCode : RealToStr(Cell.R,2,Length(Image.text),Image.text);
  625. ***** ^ not supported yet
  626. ***** ^ not supported yet
  627. ***** ^ not supported yet
  628. ***** ^ not supported yet
  629. ***** ^ not supported yet
  630. ***** ^ not supported yet
  631. ***** ^ not supported yet
  632. ***** ^ not supported yet
  633. ***** ^ not supported yet
  634. 254 |GroupMember: FldPtr^.selected := Cell.B;
  635. ***** ^ not supported yet
  636. ***** ^ not supported yet
  637. ***** ^ not supported yet
  638. ***** ^ not supported yet
  639. ***** ^ not supported yet
  640. 255 END;
  641. 256 PutFieldImageRec(Image,T^.DF,FieldNbr);
  642. ***** ^ not supported yet
  643. ***** ^ not supported yet
  644. ***** ^ not supported yet
  645. ***** ^ not supported yet
  646. ***** ^ not supported yet
  647. 257 END PutCell;
  648. ***** ^ not supported yet
  649. 258
  650. 259 PROCEDURE GetCell(VAR T:Table; X,Y : CARDINAL; VAR Cell : CellValue); (* get contents of cell*)
  651. ***** ^ undeclared identifier
  652. 260 VAR
  653. 261 FieldNbr : CARDINAL;
  654. 262 Image : ImageElement;
  655. 263 FldPtr : InputFieldPtr;
  656. 264 B : BOOLEAN;
  657. 265 LL : CARDINAL;
  658. 266 BEGIN
  659. 267 LL := ListLength(T^.RowDef);
  660. ***** ^ not supported yet
  661. ***** ^ not supported yet
  662. ***** ^ not supported yet
  663. 268 FieldNbr := ((Y) * LL) + X; (* compute field nbr*)
  664. 269 GetImageRec(T^.DF,FieldNbr,Image);
  665. ***** ^ not supported yet
  666. ***** ^ not supported yet
  667. ***** ^ not supported yet
  668. ***** ^ not supported yet
  669. 270 GetFieldPtr(T^.DF,FieldNbr,FldPtr);
  670. ***** ^ not supported yet
  671. ***** ^ not supported yet
  672. ***** ^ not supported yet
  673. ***** ^ not supported yet
  674. 271 CASE FldPtr^.typ OF
  675. ***** ^ not supported yet
  676. ***** ^ not supported yet
  677. 272 StringCode,DispCode : Assign( Image.text,Cell.Str);
  678. ***** ^ not supported yet
  679. ***** ^ not supported yet
  680. ***** ^ not supported yet
  681. ***** ^ not supported yet
  682. ***** ^ not supported yet
  683. ***** ^ not supported yet
  684. ***** ^ not supported yet
  685. 273 |IntCode : B := StrToInteger(Image.text,0,Cell.I);
  686. ***** ^ not supported yet
  687. ***** ^ not supported yet
  688. ***** ^ not supported yet
  689. ***** ^ not supported yet
  690. ***** ^ not supported yet
  691. ***** ^ not supported yet
  692. 274 |RealCode : B := StrToReal(Image.text,0,Cell.R);
  693. ***** ^ not supported yet
  694. ***** ^ not supported yet
  695. ***** ^ not supported yet
  696. ***** ^ not supported yet
  697. ***** ^ not supported yet
  698. ***** ^ not supported yet
  699. 275 |GroupMember: Cell.B := FldPtr^.selected;
  700. ***** ^ not supported yet
  701. ***** ^ not supported yet
  702. ***** ^ not supported yet
  703. ***** ^ not supported yet
  704. ***** ^ not supported yet
  705. 276 END;
  706. 277
  707. 278 END GetCell;
  708. ***** ^ not supported yet
  709. 279
  710. 280 PROCEDURE NumberOfRows(T : Table) : CARDINAL;
  711. 281 BEGIN
  712. 282 RETURN T^.NumberOfRows;
  713. ***** ^ not supported yet
  714. ***** ^ not supported yet
  715. 283 END NumberOfRows;
  716. ***** ^ not supported yet
  717. 284
  718. 285 PROCEDURE NumberOfCols( T : Table) : CARDINAL;
  719. 286 BEGIN
  720. 287 RETURN T^.NumberOfCols;
  721. ***** ^ not supported yet
  722. ***** ^ not supported yet
  723. 288 END NumberOfCols;
  724. ***** ^ not supported yet
  725. 289
  726. 290 END Tables.
  727. ***** ^ not supported yet
  728. 436 errors