ADDRBOOK.LST 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171
  1. Listing:
  2. 1 MODULE AddrBook;
  3. 2 (*
  4. 3 * ModBase
  5. 4 * Release 3.0
  6. 5 * (c) Copyright 1986 - 1990 Donald G. Fletcher
  7. 6 * (c) Copyright 1986 - 1990 PMI
  8. 7 * P.O. Box 8402
  9. 8 * Green Bay Wi 53308
  10. 9 * All Rights Reserved
  11. 10 *)
  12. 11 (* IMPORT PMD;*)
  13. 12 IMPORT DBIndxes;
  14. 13 IMPORT DspFiles;
  15. 14 IMPORT ErrorManager;
  16. 15 IMPORT HandleIO;
  17. 16 IMPORT KbdInput;
  18. 17 IMPORT LowLevel;
  19. 18 IMPORT M2Strings;
  20. 19 IMPORT ModBase3;
  21. 20 IMPORT MsColors;
  22. 21 IMPORT PosUtils;
  23. 22 IMPORT ScreenDisplay;
  24. 23 IMPORT ScreenInput;
  25. 24 IMPORT Scrn2DBF;
  26. 25 IMPORT ScrnTypes;
  27. 26 IMPORT SmartScreen;
  28. 27 IMPORT StrConv;
  29. 28 IMPORT StrEdit;
  30. 29 IMPORT StringIO;
  31. 30 IMPORT SYSTEM;
  32. 31 IMPORT UserOps;
  33. 32 IMPORT VWindows;
  34. 33 IMPORT WindowPrims;
  35. 34
  36. 35 IMPORT InitCompilerMods;
  37. 36
  38. 37 VAR
  39. 38 DataFile: ModBase3.DBFile;
  40. ***** ^ not supported yet
  41. 39 IndexByName: DBIndxes.DBIndex;
  42. ***** ^ not supported yet
  43. 40 ScreenFile : ScrnTypes.DisplayFile;
  44. ***** ^ not supported yet
  45. 41 SavedCursorHeight : CARDINAL;
  46. 42
  47. 43 PROCEDURE Confirm(query: ARRAY OF CHAR): BOOLEAN;
  48. ***** ^ not supported yet
  49. 44 VAR
  50. 45 KeyHit: CARDINAL;
  51. 46 BEGIN
  52. 47 WindowPrims.MsgBox( VWindows.SE, query,
  53. ***** ^ not supported yet
  54. ***** ^ not supported yet
  55. ***** ^ not supported yet
  56. ***** ^ not supported yet
  57. ***** ^ not supported yet
  58. 48 KbdInput.YorN, KeyHit );
  59. ***** ^ not supported yet
  60. ***** ^ not supported yet
  61. ***** ^ not supported yet
  62. 49 RETURN KbdInput.CAPkey( KeyHit ) = ORD('Y');
  63. ***** ^ not supported yet
  64. ***** ^ not supported yet
  65. ***** ^ not supported yet
  66. ***** ^ undeclared identifier
  67. ***** ^ not supported yet
  68. 50 END Confirm;
  69. ***** ^ not supported yet
  70. 51
  71. 52 PROCEDURE ChangeExtension(VAR name: ARRAY OF CHAR; ext: ARRAY OF CHAR);
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. 53 VAR
  75. 54 i, j: CARDINAL;
  76. 55 BEGIN
  77. 56 i := 0;
  78. 57 StrEdit.CrunchBlanks(name);
  79. ***** ^ not supported yet
  80. ***** ^ not supported yet
  81. ***** ^ not supported yet
  82. 58 LOOP
  83. 59 IF (i > HIGH(name)) OR (name[i] = 0C) OR (name[i] = '.') THEN
  84. ***** ^ undeclared identifier
  85. ***** ^ not supported yet
  86. ***** ^ not supported yet
  87. ***** ^ not supported yet
  88. ***** ^ not supported yet
  89. ***** ^ not supported yet
  90. 60 EXIT
  91. 61 END;
  92. 62 INC(i);
  93. ***** ^ undeclared identifier
  94. ***** ^ not supported yet
  95. 63 END; (* LOOP *)
  96. 64 IF i <= (HIGH(name)) THEN
  97. ***** ^ undeclared identifier
  98. ***** ^ not supported yet
  99. 65 name[i] := '.';
  100. ***** ^ not supported yet
  101. ***** ^ not supported yet
  102. 66 INC(i);
  103. ***** ^ undeclared identifier
  104. ***** ^ not supported yet
  105. 67 FOR j := 0 TO 2 DO
  106. 68 IF i <= HIGH(name) THEN
  107. ***** ^ undeclared identifier
  108. ***** ^ not supported yet
  109. 69 name[i] := ext[j];
  110. ***** ^ not supported yet
  111. ***** ^ not supported yet
  112. ***** ^ not supported yet
  113. ***** ^ not supported yet
  114. 70 INC(i);
  115. ***** ^ undeclared identifier
  116. ***** ^ not supported yet
  117. 71 END;
  118. 72 END;
  119. 73 END;
  120. 74 END ChangeExtension;
  121. ***** ^ not supported yet
  122. 75
  123. 76 PROCEDURE GetNewDbFile( VAR TheDbFile: ModBase3.DBFile; VAR TheDbIndex:
  124. ***** ^ not supported yet
  125. 77 DBIndxes.DBIndex; TheName: ARRAY OF CHAR ): BOOLEAN;
  126. ***** ^ not supported yet
  127. ***** ^ not supported yet
  128. 78 VAR
  129. 79 temp: ARRAY [1..8] OF ModBase3.DBFieldDescriptor;
  130. ***** ^ not supported yet
  131. ***** ^ not supported yet
  132. 80 TmpStr: ARRAY [0..255] OF CHAR;
  133. ***** ^ not supported yet
  134. ***** ^ not supported yet
  135. 81 IndexOpened : BOOLEAN;
  136. 82 BEGIN
  137. 83 IF ModBase3.Initialized(TheDbFile) THEN
  138. ***** ^ not supported yet
  139. ***** ^ not supported yet
  140. ***** ^ not supported yet
  141. 84 ModBase3.CloseDBF( TheDbFile );
  142. ***** ^ not supported yet
  143. ***** ^ not supported yet
  144. ***** ^ not supported yet
  145. 85 ModBase3.DisposeDBF(TheDbFile);
  146. ***** ^ not supported yet
  147. ***** ^ not supported yet
  148. ***** ^ not supported yet
  149. 86 DBIndxes.CloseIndex( TheDbIndex );
  150. ***** ^ not supported yet
  151. ***** ^ not supported yet
  152. ***** ^ not supported yet
  153. 87 DBIndxes.DisposeIndex(TheDbIndex );
  154. ***** ^ not supported yet
  155. ***** ^ not supported yet
  156. ***** ^ not supported yet
  157. 88 END;
  158. 89 ChangeExtension( TheName, 'dbf');
  159. ***** ^ not supported yet
  160. ***** ^ not supported yet
  161. ***** ^ not supported yet
  162. 90 IndexOpened := FALSE;
  163. 91 ModBase3.InitDBF( TheName, TheDbFile, 0, TRUE ,FALSE,TRUE,ModBase3.DefaultFixUp);
  164. ***** ^ not supported yet
  165. ***** ^ not supported yet
  166. ***** ^ not supported yet
  167. ***** ^ not supported yet
  168. ***** ^ not supported yet
  169. ***** ^ not supported yet
  170. 92 IF NOT ModBase3.OpenDBF( TheDbFile ) THEN
  171. ***** ^ not supported yet
  172. ***** ^ not supported yet
  173. ***** ^ not supported yet
  174. 93 StrEdit.AssignStr(
  175. ***** ^ not supported yet
  176. ***** ^ not supported yet
  177. 94 'File not found. Create a new file named ', TmpStr );
  178. ***** ^ not supported yet
  179. ***** ^ not supported yet
  180. 95 StrEdit.Append( TmpStr, TheName );
  181. ***** ^ not supported yet
  182. ***** ^ not supported yet
  183. ***** ^ not supported yet
  184. ***** ^ not supported yet
  185. 96 StrEdit.CutTrailingChars( ' ', TmpStr );
  186. ***** ^ not supported yet
  187. ***** ^ not supported yet
  188. ***** ^ not supported yet
  189. 97 StrEdit.Append( TmpStr, '? (Y/N)' );
  190. ***** ^ not supported yet
  191. ***** ^ not supported yet
  192. ***** ^ not supported yet
  193. ***** ^ not supported yet
  194. 98 IF Confirm( TmpStr ) THEN
  195. ***** ^ not supported yet
  196. ***** ^ not supported yet
  197. 99 temp[1].name := 'NAME';
  198. ***** ^ not supported yet
  199. ***** ^ not supported yet
  200. ***** ^ not supported yet
  201. ***** ^ not supported yet
  202. 100 temp[1].size := 30;
  203. ***** ^ not supported yet
  204. ***** ^ not supported yet
  205. ***** ^ not supported yet
  206. 101 temp[1].fldtype := 'C';
  207. ***** ^ not supported yet
  208. ***** ^ not supported yet
  209. ***** ^ not supported yet
  210. 102
  211. 103 temp[2].name := 'COMPANY';
  212. ***** ^ not supported yet
  213. ***** ^ not supported yet
  214. ***** ^ not supported yet
  215. ***** ^ not supported yet
  216. 104 temp[2].size := 30;
  217. ***** ^ not supported yet
  218. ***** ^ not supported yet
  219. ***** ^ not supported yet
  220. 105 temp[2].fldtype := 'C';
  221. ***** ^ not supported yet
  222. ***** ^ not supported yet
  223. ***** ^ not supported yet
  224. 106
  225. 107 temp[3].name := 'ADDRESS1';
  226. ***** ^ not supported yet
  227. ***** ^ not supported yet
  228. ***** ^ not supported yet
  229. ***** ^ not supported yet
  230. 108 temp[3].size := 30;
  231. ***** ^ not supported yet
  232. ***** ^ not supported yet
  233. ***** ^ not supported yet
  234. 109 temp[3].fldtype := 'C';
  235. ***** ^ not supported yet
  236. ***** ^ not supported yet
  237. ***** ^ not supported yet
  238. 110
  239. 111 temp[4].name := 'ADDRESS2';
  240. ***** ^ not supported yet
  241. ***** ^ not supported yet
  242. ***** ^ not supported yet
  243. ***** ^ not supported yet
  244. 112 temp[4].size := 30;
  245. ***** ^ not supported yet
  246. ***** ^ not supported yet
  247. ***** ^ not supported yet
  248. 113 temp[4].fldtype := 'C';
  249. ***** ^ not supported yet
  250. ***** ^ not supported yet
  251. ***** ^ not supported yet
  252. 114
  253. 115 temp[5].name := 'CITY';
  254. ***** ^ not supported yet
  255. ***** ^ not supported yet
  256. ***** ^ not supported yet
  257. ***** ^ not supported yet
  258. 116 temp[5].size := 20;
  259. ***** ^ not supported yet
  260. ***** ^ not supported yet
  261. ***** ^ not supported yet
  262. 117 temp[5].fldtype := 'C';
  263. ***** ^ not supported yet
  264. ***** ^ not supported yet
  265. ***** ^ not supported yet
  266. 118
  267. 119 temp[6].name := 'STATE';
  268. ***** ^ not supported yet
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. ***** ^ not supported yet
  272. 120 temp[6].size := 2;
  273. ***** ^ not supported yet
  274. ***** ^ not supported yet
  275. ***** ^ not supported yet
  276. 121 temp[6].fldtype := 'C';
  277. ***** ^ not supported yet
  278. ***** ^ not supported yet
  279. ***** ^ not supported yet
  280. 122
  281. 123 temp[7].name := 'ZIPCODE';
  282. ***** ^ not supported yet
  283. ***** ^ not supported yet
  284. ***** ^ not supported yet
  285. ***** ^ not supported yet
  286. 124 temp[7].size := 10;
  287. ***** ^ not supported yet
  288. ***** ^ not supported yet
  289. ***** ^ not supported yet
  290. 125 temp[7].fldtype := 'C';
  291. ***** ^ not supported yet
  292. ***** ^ not supported yet
  293. ***** ^ not supported yet
  294. 126
  295. 127 temp[8].name := 'ASKDATE';
  296. ***** ^ not supported yet
  297. ***** ^ not supported yet
  298. ***** ^ not supported yet
  299. ***** ^ not supported yet
  300. 128 temp[8].size := 8;
  301. ***** ^ not supported yet
  302. ***** ^ not supported yet
  303. ***** ^ not supported yet
  304. 129 temp[8].fldtype := 'C';
  305. ***** ^ not supported yet
  306. ***** ^ not supported yet
  307. ***** ^ not supported yet
  308. 130
  309. 131 StringIO.PrintMessage(ModBase3.BuildDBF( temp, 8, TheDbFile ));
  310. ***** ^ not supported yet
  311. ***** ^ not supported yet
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. ***** ^ not supported yet
  315. ***** ^ not supported yet
  316. 132
  317. 133 END;
  318. 134 END;
  319. 135 ChangeExtension(TheName, 'NUM');
  320. ***** ^ not supported yet
  321. ***** ^ not supported yet
  322. ***** ^ not supported yet
  323. 136 IF ModBase3.OpenDBF(TheDbFile) THEN
  324. ***** ^ not supported yet
  325. ***** ^ not supported yet
  326. ***** ^ not supported yet
  327. 137 IF HandleIO.FileExists( TheName ) THEN
  328. ***** ^ not supported yet
  329. ***** ^ not supported yet
  330. ***** ^ not supported yet
  331. 138 DBIndxes.InitIndex(TheName, TheDbIndex,TheDbFile, 5, TRUE,TRUE,FALSE);
  332. ***** ^ not supported yet
  333. ***** ^ not supported yet
  334. ***** ^ not supported yet
  335. ***** ^ not supported yet
  336. ***** ^ not supported yet
  337. ***** ^ not supported yet
  338. 139 IndexOpened := DBIndxes.OpenIndex(TheDbIndex);
  339. ***** ^ not supported yet
  340. ***** ^ not supported yet
  341. ***** ^ not supported yet
  342. 140 ELSE
  343. 141 DBIndxes.InitIndex(TheName, TheDbIndex, TheDbFile, 5, TRUE,TRUE,FALSE);
  344. ***** ^ not supported yet
  345. ***** ^ not supported yet
  346. ***** ^ not supported yet
  347. ***** ^ not supported yet
  348. ***** ^ not supported yet
  349. ***** ^ not supported yet
  350. 142 StringIO.PrintMessage(DBIndxes.BuildIndex(TheDbIndex, 'NAME'));
  351. ***** ^ not supported yet
  352. ***** ^ not supported yet
  353. ***** ^ not supported yet
  354. ***** ^ not supported yet
  355. ***** ^ not supported yet
  356. ***** ^ not supported yet
  357. 143 IndexOpened := DBIndxes.OpenIndex(TheDbIndex);
  358. ***** ^ not supported yet
  359. ***** ^ not supported yet
  360. ***** ^ not supported yet
  361. 144 END;
  362. 145 END;
  363. 146 RETURN (*TheDbFile.open AND*) IndexOpened;
  364. 147 END GetNewDbFile;
  365. ***** ^ not supported yet
  366. 148
  367. 149 PROCEDURE ProcessNumberedRecord( RecordNumber: LONGINT;
  368. 150 NewRecord: BOOLEAN; NameIfNew: ARRAY OF CHAR ): ScrnTypes.FrameKey;
  369. ***** ^ not supported yet
  370. ***** ^ not supported yet
  371. 151 VAR
  372. 152 NxtFrame: ScrnTypes.FrameKey;
  373. ***** ^ not supported yet
  374. 153 TheCount: CARDINAL;
  375. 154 BEGIN
  376. 155 IF (RecordNumber >ModBase3.NumberRecords(DataFile)) THEN
  377. ***** ^ not supported yet
  378. ***** ^ not supported yet
  379. ***** ^ not supported yet
  380. 156 IF NOT NewRecord THEN
  381. 157 RETURN 2;
  382. ***** ^ bad RETURN
  383. 158 END;
  384. 159 END;
  385. 160 ScreenDisplay.ReadDisplayFrame( ScreenFile,
  386. ***** ^ not supported yet
  387. ***** ^ not supported yet
  388. ***** ^ not supported yet
  389. 161 DspFiles.MainFrame, 4 );
  390. ***** ^ not supported yet
  391. ***** ^ not supported yet
  392. ***** ^ not supported yet
  393. 162 (* The data input frame. *)
  394. 163 IF NOT NewRecord THEN
  395. 164 ModBase3.ReadDBRec( DataFile, RecordNumber );
  396. ***** ^ not supported yet
  397. ***** ^ not supported yet
  398. ***** ^ not supported yet
  399. ***** ^ not supported yet
  400. 165 IF ModBase3.Deleted( DataFile ) THEN
  401. ***** ^ not supported yet
  402. ***** ^ not supported yet
  403. ***** ^ not supported yet
  404. 166 RETURN 2;
  405. ***** ^ bad RETURN
  406. 167 END;
  407. 168 Scrn2DBF.DBFToFrame( DataFile, DspFiles.MainFrame );
  408. ***** ^ not supported yet
  409. ***** ^ not supported yet
  410. ***** ^ not supported yet
  411. ***** ^ not supported yet
  412. ***** ^ not supported yet
  413. 169 ELSE
  414. 170 ScreenInput.ChangeField( DspFiles.MainFrame,
  415. ***** ^ not supported yet
  416. ***** ^ not supported yet
  417. ***** ^ not supported yet
  418. ***** ^ not supported yet
  419. 171 NameIfNew, 'NAME', TRUE );
  420. ***** ^ not supported yet
  421. ***** ^ not supported yet
  422. ***** ^ not supported yet
  423. 172 END;
  424. 173 REPEAT
  425. 174 (* MainFrame should always have frame 4, the input frame,
  426. 175 in it at this point. *)
  427. 176 ScreenDisplay.ShowDisplayFrame( DspFiles.MainFrame,
  428. ***** ^ not supported yet
  429. ***** ^ not supported yet
  430. ***** ^ not supported yet
  431. ***** ^ not supported yet
  432. 177 0, 0, 0, 0 );
  433. ***** ^ not supported yet
  434. 178 ScreenDisplay.PushFrame( DspFiles.MainFrame );
  435. ***** ^ not supported yet
  436. ***** ^ not supported yet
  437. ***** ^ not supported yet
  438. ***** ^ not supported yet
  439. 179 (* This saves the contents of the input frame until we
  440. 180 are ready to Edit it or write it to the DataFile. *)
  441. 181 NxtFrame := 3; (* The Edit/Save/Delete/Return menu. *)
  442. ***** ^ not supported yet
  443. 182 ScreenInput.Input( NxtFrame );
  444. ***** ^ not supported yet
  445. ***** ^ not supported yet
  446. ***** ^ not supported yet
  447. 183 CASE NxtFrame OF
  448. ***** ^ not supported yet
  449. 184 4: (* User wants to Edit record. *)
  450. 185 ScreenDisplay.PopFrame( DspFiles.MainFrame );
  451. ***** ^ not supported yet
  452. ***** ^ not supported yet
  453. ***** ^ not supported yet
  454. ***** ^ not supported yet
  455. 186 (* Pop frame 3 off MainFrame's frame stack,
  456. 187 bringing frame 4 back to the top. *)
  457. 188 NxtFrame := ScreenInput.ControlFrame(
  458. ***** ^ not supported yet
  459. ***** ^ not supported yet
  460. ***** ^ not supported yet
  461. 189 DspFiles.MainFrame, 0, '', FALSE );
  462. ***** ^ not supported yet
  463. ***** ^ not supported yet
  464. ***** ^ not supported yet
  465. 190 | 9: (*Save*)
  466. 191 ScreenDisplay.PopFrame( DspFiles.MainFrame );
  467. ***** ^ not supported yet
  468. ***** ^ not supported yet
  469. ***** ^ not supported yet
  470. ***** ^ not supported yet
  471. 192 (* Brings the input frame back to the top of
  472. 193 MainFrame's frame stack. *)
  473. 194 IF NewRecord THEN
  474. 195 ModBase3.AppendBlank( DataFile );
  475. ***** ^ not supported yet
  476. ***** ^ not supported yet
  477. ***** ^ not supported yet
  478. 196 END;
  479. 197 IF NOT Scrn2DBF.FrameToDBF( DataFile,
  480. ***** ^ not supported yet
  481. ***** ^ not supported yet
  482. ***** ^ not supported yet
  483. 198 DspFiles.MainFrame) THEN
  484. ***** ^ not supported yet
  485. ***** ^ not supported yet
  486. 199 IF NOT Confirm( 'Error writing record. Continue?' ) THEN
  487. ***** ^ not supported yet
  488. ***** ^ not supported yet
  489. 200 HALT;
  490. ***** ^ undeclared identifier
  491. 201 END;
  492. 202 END;
  493. 203 ModBase3.WriteDBRec( DataFile );
  494. ***** ^ not supported yet
  495. ***** ^ not supported yet
  496. ***** ^ not supported yet
  497. 204 IF NOT NewRecord THEN
  498. 205 DBIndxes.DeleteCurrentEntry( IndexByName );
  499. ***** ^ not supported yet
  500. ***** ^ not supported yet
  501. ***** ^ not supported yet
  502. 206 ELSE
  503. 207 NewRecord := FALSE;
  504. 208 END;
  505. 209 DBIndxes.AddRecord( DataFile, IndexByName );
  506. ***** ^ not supported yet
  507. ***** ^ not supported yet
  508. ***** ^ not supported yet
  509. ***** ^ not supported yet
  510. 210 ScreenDisplay.PushFrame( DspFiles.MainFrame );
  511. ***** ^ not supported yet
  512. ***** ^ not supported yet
  513. ***** ^ not supported yet
  514. ***** ^ not supported yet
  515. 211 (* We're going to be pushing MainFrame at the top
  516. 212 of the next loop, so we save and restore it
  517. 213 here. *)
  518. 214 ScreenInput.Input( NxtFrame ); (* success message *)
  519. ***** ^ not supported yet
  520. ***** ^ not supported yet
  521. ***** ^ not supported yet
  522. 215 ScreenDisplay.PopFrame( DspFiles.MainFrame );
  523. ***** ^ not supported yet
  524. ***** ^ not supported yet
  525. ***** ^ not supported yet
  526. ***** ^ not supported yet
  527. 216 | 10: (*Delete*)
  528. 217 ScreenDisplay.PopFrame( DspFiles.MainFrame );
  529. ***** ^ not supported yet
  530. ***** ^ not supported yet
  531. ***** ^ not supported yet
  532. ***** ^ not supported yet
  533. 218 IF NOT NewRecord THEN
  534. 219 ModBase3.DeleteRecord( DataFile );
  535. ***** ^ not supported yet
  536. ***** ^ not supported yet
  537. ***** ^ not supported yet
  538. 220 DBIndxes.DeleteCurrentEntry( IndexByName );
  539. ***** ^ not supported yet
  540. ***** ^ not supported yet
  541. ***** ^ not supported yet
  542. 221 END;
  543. 222 NewRecord := TRUE;
  544. 223 ScreenDisplay.PushFrame( DspFiles.MainFrame );
  545. ***** ^ not supported yet
  546. ***** ^ not supported yet
  547. ***** ^ not supported yet
  548. ***** ^ not supported yet
  549. 224 ScreenInput.Input( NxtFrame ); (* success message *)
  550. ***** ^ not supported yet
  551. ***** ^ not supported yet
  552. ***** ^ not supported yet
  553. 225 ScreenDisplay.PopFrame( DspFiles.MainFrame );
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. ***** ^ not supported yet
  557. ***** ^ not supported yet
  558. 226 | 2: (*Return*)
  559. 227 ScreenDisplay.PopFrame( DspFiles.MainFrame );
  560. ***** ^ not supported yet
  561. ***** ^ not supported yet
  562. ***** ^ not supported yet
  563. ***** ^ not supported yet
  564. 228 END;
  565. 229 UNTIL (NxtFrame = 2);
  566. ***** ^ not supported yet
  567. 230 RETURN NxtFrame;
  568. ***** ^ not supported yet
  569. 231 END ProcessNumberedRecord;
  570. ***** ^ not supported yet
  571. 232
  572. 233 PROCEDURE ProcessNamedRecord( RecordName: ARRAY OF CHAR; VAR
  573. ***** ^ not supported yet
  574. 234 RecordNumber: LONGINT ): ScrnTypes.FrameKey;
  575. ***** ^ not supported yet
  576. 235 VAR
  577. 236 found: BOOLEAN;
  578. 237 BEGIN
  579. 238 IF PosUtils.IsBlank( RecordName ) THEN
  580. ***** ^ not supported yet
  581. ***** ^ not supported yet
  582. ***** ^ not supported yet
  583. 239 RETURN 2;
  584. ***** ^ bad RETURN
  585. 240 END;
  586. 241 DBIndxes.FindPositionCh( IndexByName, RecordName, found );
  587. ***** ^ not supported yet
  588. ***** ^ not supported yet
  589. ***** ^ not supported yet
  590. ***** ^ not supported yet
  591. ***** ^ not supported yet
  592. 242 IF (NOT found) AND
  593. 243 (NOT Confirm( 'Record not found. Create it? (Y/N)' )) THEN
  594. ***** ^ not supported yet
  595. ***** ^ not supported yet
  596. 244 RETURN 2;
  597. ***** ^ bad RETURN
  598. 245 END;
  599. 246 RecordNumber := DBIndxes.CurrentRec( IndexByName );
  600. ***** ^ not supported yet
  601. ***** ^ not supported yet
  602. ***** ^ not supported yet
  603. 247 ScreenDisplay.ReadDisplayFrame( ScreenFile,
  604. ***** ^ not supported yet
  605. ***** ^ not supported yet
  606. ***** ^ not supported yet
  607. 248 DspFiles.MainFrame, 4 );
  608. ***** ^ not supported yet
  609. ***** ^ not supported yet
  610. ***** ^ not supported yet
  611. 249 (* Reads the data input frame from disk into MainFrame. *)
  612. 250 RETURN ProcessNumberedRecord( RecordNumber, NOT found, RecordName );
  613. ***** ^ not supported yet
  614. ***** ^ not supported yet
  615. 251 END ProcessNamedRecord;
  616. ***** ^ not supported yet
  617. 252
  618. 253 PROCEDURE ImportFromAscii( VAR TheDbFile: ModBase3.DBFile; VAR
  619. ***** ^ not supported yet
  620. 254 TheIndexFile: DBIndxes.DBIndex; AsciiFileName: ARRAY OF CHAR ):
  621. ***** ^ not supported yet
  622. ***** ^ not supported yet
  623. 255 BOOLEAN;
  624. 256 (*Assumes the ascii file contains fixed-length records, each
  625. 257 on a single CR/LF-terminated line. *)
  626. 258 VAR
  627. 259 FieldCnt, FileHandle: CARDINAL;
  628. 260 CheckStr: ARRAY [0..1] OF CHAR;
  629. ***** ^ not supported yet
  630. ***** ^ not supported yet
  631. 261 fpt:ModBase3.DBFieldPtr;
  632. ***** ^ not supported yet
  633. 262 BEGIN
  634. 263 IF NOT (HandleIO.OpenFile( FileHandle, AsciiFileName) =
  635. ***** ^ not supported yet
  636. ***** ^ not supported yet
  637. ***** ^ not supported yet
  638. 264 StringIO.NoError) THEN
  639. ***** ^ not supported yet
  640. ***** ^ not supported yet
  641. 265 RETURN FALSE;
  642. 266 END;
  643. 267 fpt:= ModBase3.FieldList(TheDbFile);
  644. ***** ^ not supported yet
  645. ***** ^ not supported yet
  646. ***** ^ not supported yet
  647. ***** ^ not supported yet
  648. 268 LOOP
  649. 269 ModBase3.AppendBlank( TheDbFile );
  650. ***** ^ not supported yet
  651. ***** ^ not supported yet
  652. ***** ^ not supported yet
  653. 270 FieldCnt := 1;
  654. 271 REPEAT
  655. 272 IF NOT (HandleIO.BlockRead( FileHandle,
  656. ***** ^ not supported yet
  657. ***** ^ not supported yet
  658. 273 LowLevel.AddAddr(ModBase3.RecordPtr(TheDbFile),
  659. ***** ^ not supported yet
  660. ***** ^ not supported yet
  661. ***** ^ not supported yet
  662. ***** ^ not supported yet
  663. ***** ^ not supported yet
  664. 274 fpt^[FieldCnt].offset - 1),
  665. ***** ^ not supported yet
  666. ***** ^ not supported yet
  667. ***** ^ not supported yet
  668. ***** ^ not supported yet
  669. 275 fpt^[FieldCnt].size ) =
  670. ***** ^ not supported yet
  671. ***** ^ not supported yet
  672. ***** ^ not supported yet
  673. 276 StringIO.NoError) THEN
  674. ***** ^ not supported yet
  675. ***** ^ not supported yet
  676. 277 EXIT;
  677. 278 END;
  678. 279 INC( FieldCnt );
  679. ***** ^ undeclared identifier
  680. ***** ^ not supported yet
  681. 280 UNTIL FieldCnt > ModBase3.NumberOfFields(TheDbFile);
  682. ***** ^ not supported yet
  683. ***** ^ not supported yet
  684. ***** ^ not supported yet
  685. 281 IF NOT (HandleIO.BlockRead( FileHandle,
  686. ***** ^ not supported yet
  687. ***** ^ not supported yet
  688. 282 SYSTEM.ADR(CheckStr), 2 ) = StringIO.NoError) THEN
  689. ***** ^ not supported yet
  690. ***** ^ not supported yet
  691. ***** ^ not supported yet
  692. ***** ^ not supported yet
  693. ***** ^ not supported yet
  694. ***** ^ not supported yet
  695. 283 (*Read what should be the CR/LF.*)
  696. 284 EXIT;
  697. 285 END;
  698. 286 IF M2Strings.CompareStr( CheckStr, StringIO.CrLf ) # 0 THEN
  699. ***** ^ not supported yet
  700. ***** ^ not supported yet
  701. ***** ^ not supported yet
  702. ***** ^ not supported yet
  703. ***** ^ not supported yet
  704. 287 EXIT;
  705. 288 (* We exit here instead of returning false to make sure
  706. 289 the FileHandle is closed. *)
  707. 290 END;
  708. 291 ModBase3.WriteDBRec( TheDbFile );
  709. ***** ^ not supported yet
  710. ***** ^ not supported yet
  711. ***** ^ not supported yet
  712. 292 DBIndxes.AddRecord( TheDbFile, TheIndexFile );
  713. ***** ^ not supported yet
  714. ***** ^ not supported yet
  715. ***** ^ not supported yet
  716. ***** ^ not supported yet
  717. 293 IF HandleIO.EndReached( FileHandle ) THEN
  718. ***** ^ not supported yet
  719. ***** ^ not supported yet
  720. ***** ^ not supported yet
  721. 294 EXIT;
  722. 295 END;
  723. 296 END;
  724. 297 IF (HandleIO.CloseHandle( FileHandle ) = StringIO.NoError) THEN
  725. ***** ^ not supported yet
  726. ***** ^ not supported yet
  727. ***** ^ not supported yet
  728. ***** ^ not supported yet
  729. ***** ^ not supported yet
  730. 298 RETURN TRUE;
  731. 299 ELSE
  732. 300 RETURN FALSE;
  733. 301 END;
  734. 302 END ImportFromAscii;
  735. ***** ^ not supported yet
  736. 303
  737. 304 PROCEDURE ExportToAscii( VAR TheDbFile: ModBase3.DBFile; AsciiFileName:
  738. ***** ^ not supported yet
  739. 305 ARRAY OF CHAR );
  740. ***** ^ not supported yet
  741. 306 VAR
  742. 307 FieldCnt, FileHandle: CARDINAL;
  743. 308 RecordNumber: LONGINT;
  744. 309 fpt:ModBase3.DBFieldPtr;
  745. ***** ^ not supported yet
  746. 310 BEGIN
  747. 311 IF NOT (HandleIO.CreateFile( FileHandle, AsciiFileName ) =
  748. ***** ^ not supported yet
  749. ***** ^ not supported yet
  750. ***** ^ not supported yet
  751. 312 StringIO.NoError) THEN
  752. ***** ^ not supported yet
  753. ***** ^ not supported yet
  754. 313 RETURN;
  755. 314 END;
  756. 315 fpt:= ModBase3.FieldList(TheDbFile);
  757. ***** ^ not supported yet
  758. ***** ^ not supported yet
  759. ***** ^ not supported yet
  760. ***** ^ not supported yet
  761. 316 RecordNumber := VAL(LONGINT, 0);
  762. ***** ^ undeclared identifier
  763. ***** ^ not supported yet
  764. 317 LOOP
  765. 318 INC( RecordNumber );
  766. ***** ^ undeclared identifier
  767. ***** ^ not supported yet
  768. 319 IF (RecordNumber > ModBase3.NumberRecords(TheDbFile)) THEN
  769. ***** ^ not supported yet
  770. ***** ^ not supported yet
  771. ***** ^ not supported yet
  772. 320 EXIT;
  773. 321 END;
  774. 322 ModBase3.ReadDBRec( TheDbFile, RecordNumber );
  775. ***** ^ not supported yet
  776. ***** ^ not supported yet
  777. ***** ^ not supported yet
  778. ***** ^ not supported yet
  779. 323 IF NOT ModBase3.Deleted( TheDbFile ) THEN
  780. ***** ^ not supported yet
  781. ***** ^ not supported yet
  782. ***** ^ not supported yet
  783. 324 (* skip records that have been marked for deletion *)
  784. 325 FieldCnt := 1;
  785. 326 REPEAT
  786. 327 IF NOT (HandleIO.BlockWrite( FileHandle,
  787. ***** ^ not supported yet
  788. ***** ^ not supported yet
  789. 328 LowLevel.AddAddr(ModBase3.RecordPtr(TheDbFile),
  790. ***** ^ not supported yet
  791. ***** ^ not supported yet
  792. ***** ^ not supported yet
  793. ***** ^ not supported yet
  794. ***** ^ not supported yet
  795. 329 fpt^[FieldCnt].offset - 1),
  796. ***** ^ not supported yet
  797. ***** ^ not supported yet
  798. ***** ^ not supported yet
  799. ***** ^ not supported yet
  800. 330 fpt^[FieldCnt].size ) =
  801. ***** ^ not supported yet
  802. ***** ^ not supported yet
  803. ***** ^ not supported yet
  804. 331 StringIO.NoError) THEN
  805. ***** ^ not supported yet
  806. ***** ^ not supported yet
  807. 332 EXIT;
  808. 333 END;
  809. 334 INC( FieldCnt );
  810. ***** ^ undeclared identifier
  811. ***** ^ not supported yet
  812. 335 UNTIL FieldCnt > ModBase3.NumberOfFields(TheDbFile);
  813. ***** ^ not supported yet
  814. ***** ^ not supported yet
  815. ***** ^ not supported yet
  816. 336 StringIO.WriteEol( FileHandle, '' );
  817. ***** ^ not supported yet
  818. ***** ^ not supported yet
  819. ***** ^ not supported yet
  820. 337 END;
  821. 338 END;
  822. 339 StringIO.PrintMessage( HandleIO.CloseHandle( FileHandle ) );
  823. ***** ^ not supported yet
  824. ***** ^ not supported yet
  825. ***** ^ not supported yet
  826. ***** ^ not supported yet
  827. ***** ^ not supported yet
  828. 340 END ExportToAscii;
  829. ***** ^ not supported yet
  830. 341
  831. 342 PROCEDURE RestoreDisplay();
  832. 343 BEGIN
  833. 344 VWindows.SetForeColor( VWindows.CurrentWindow, MsColors.lightgrey );
  834. ***** ^ not supported yet
  835. ***** ^ not supported yet
  836. ***** ^ not supported yet
  837. ***** ^ not supported yet
  838. ***** ^ not supported yet
  839. ***** ^ not supported yet
  840. 345 VWindows.SetBackColor( VWindows.CurrentWindow, MsColors.black );
  841. ***** ^ not supported yet
  842. ***** ^ not supported yet
  843. ***** ^ not supported yet
  844. ***** ^ not supported yet
  845. ***** ^ not supported yet
  846. ***** ^ not supported yet
  847. 346 VWindows.SetMonoAttr( VWindows.CurrentWindow, MsColors.plain );
  848. ***** ^ not supported yet
  849. ***** ^ not supported yet
  850. ***** ^ not supported yet
  851. ***** ^ not supported yet
  852. ***** ^ not supported yet
  853. ***** ^ not supported yet
  854. 347 VWindows.ClearPart( VWindows.CurrentWindow, 1, 1,
  855. ***** ^ not supported yet
  856. ***** ^ not supported yet
  857. ***** ^ not supported yet
  858. ***** ^ not supported yet
  859. 348 VWindows.EndCol(VWindows.CurrentWindow),
  860. ***** ^ not supported yet
  861. ***** ^ not supported yet
  862. ***** ^ not supported yet
  863. ***** ^ not supported yet
  864. 349 VWindows.EndRow(VWindows.CurrentWindow) );
  865. ***** ^ not supported yet
  866. ***** ^ not supported yet
  867. ***** ^ not supported yet
  868. ***** ^ not supported yet
  869. 350 VWindows.SetCursorHeight( VWindows.CurrentWindow, SavedCursorHeight );
  870. ***** ^ not supported yet
  871. ***** ^ not supported yet
  872. ***** ^ not supported yet
  873. ***** ^ not supported yet
  874. ***** ^ not supported yet
  875. 351 END RestoreDisplay;
  876. ***** ^ not supported yet
  877. 352
  878. 353 PROCEDURE CloseFiles();
  879. 354 BEGIN
  880. 355 DspFiles.CloseDisplayFile( ScreenFile );
  881. ***** ^ not supported yet
  882. ***** ^ not supported yet
  883. ***** ^ not supported yet
  884. 356 IF ModBase3.Initialized(DataFile) AND ModBase3.OpenDBF(DataFile) THEN
  885. ***** ^ not supported yet
  886. ***** ^ not supported yet
  887. ***** ^ not supported yet
  888. ***** ^ not supported yet
  889. ***** ^ not supported yet
  890. ***** ^ not supported yet
  891. 357 ModBase3.CloseDBF( DataFile );
  892. ***** ^ not supported yet
  893. ***** ^ not supported yet
  894. ***** ^ not supported yet
  895. 358 DBIndxes.CloseIndex( IndexByName );
  896. ***** ^ not supported yet
  897. ***** ^ not supported yet
  898. ***** ^ not supported yet
  899. 359 END;
  900. 360 END CloseFiles;
  901. ***** ^ not supported yet
  902. 361
  903. 362
  904. 363 VAR
  905. 364 NextFrame : ScrnTypes.FrameKey;
  906. ***** ^ not supported yet
  907. 365 CurrentRecName: ARRAY [0..29] OF CHAR;
  908. ***** ^ not supported yet
  909. ***** ^ not supported yet
  910. 366 CurrentRecNum: LONGINT;
  911. 367 AsciiFileName, DbFileName: ARRAY [0..63] OF CHAR;
  912. ***** ^ not supported yet
  913. ***** ^ not supported yet
  914. 368 dumbool: BOOLEAN;
  915. 369
  916. 370 BEGIN (* MAIN *)
  917. 371 ModBase3.NilDBF(DataFile);
  918. ***** ^ not supported yet
  919. ***** ^ not supported yet
  920. ***** ^ not supported yet
  921. 372 SavedCursorHeight := WindowPrims.GetCursorHeight();
  922. ***** ^ not supported yet
  923. ***** ^ not supported yet
  924. ***** ^ not supported yet
  925. 373 (*VWindows.GetCursorHeight( VWindows.CurrentWindow );*)
  926. 374 SmartScreen.SetCursorHeight(0);
  927. ***** ^ not supported yet
  928. ***** ^ not supported yet
  929. ***** ^ not supported yet
  930. 375 (* VWindows.SetCursorHeight( VWindows.CurrentWindow, 0 );*)
  931. 376 ErrorManager.AddTermProc( RestoreDisplay );
  932. ***** ^ not supported yet
  933. ***** ^ not supported yet
  934. ***** ^ not supported yet
  935. 377 ErrorManager.AddTermProc( CloseFiles );
  936. ***** ^ not supported yet
  937. ***** ^ not supported yet
  938. ***** ^ not supported yet
  939. 378 CurrentRecName := '';
  940. ***** ^ not supported yet
  941. ***** ^ incompatible assignment
  942. 379 CurrentRecNum := VAL( LONGINT, 1 );
  943. ***** ^ undeclared identifier
  944. ***** ^ not supported yet
  945. 380 ScreenDisplay.OpenDisplayFile( ScreenFile, 'AddrBook.DSP' );
  946. ***** ^ not supported yet
  947. ***** ^ not supported yet
  948. ***** ^ not supported yet
  949. ***** ^ not supported yet
  950. 381 ScreenDisplay.Display( 1 );
  951. ***** ^ not supported yet
  952. ***** ^ not supported yet
  953. ***** ^ not supported yet
  954. 382 (* the box and the banner *)
  955. 383 NextFrame := 8;
  956. ***** ^ not supported yet
  957. 384 ScreenInput.Input( NextFrame );
  958. ***** ^ not supported yet
  959. ***** ^ not supported yet
  960. ***** ^ not supported yet
  961. 385 (* Prompts for the name of the database file; you could get
  962. 386 it from the command line if you wanted to. *)
  963. 387 ScreenInput.ReadInput( DspFiles.MainFrame, DbFileName,
  964. ***** ^ not supported yet
  965. ***** ^ not supported yet
  966. ***** ^ not supported yet
  967. ***** ^ not supported yet
  968. ***** ^ not supported yet
  969. 388 dumbool, 'filename' );
  970. ***** ^ not supported yet
  971. 389 StrEdit.CrunchBlanks( DbFileName );
  972. ***** ^ not supported yet
  973. ***** ^ not supported yet
  974. ***** ^ not supported yet
  975. 390 IF GetNewDbFile( DataFile, IndexByName, DbFileName ) THEN
  976. ***** ^ not supported yet
  977. ***** ^ not supported yet
  978. ***** ^ not supported yet
  979. ***** ^ not supported yet
  980. 391 LOOP
  981. 392 (*NextFrame should always be 2 at this point.*)
  982. 393 ScreenInput.Input( NextFrame );
  983. ***** ^ not supported yet
  984. ***** ^ not supported yet
  985. ***** ^ not supported yet
  986. 394 CASE NextFrame OF
  987. ***** ^ not supported yet
  988. 395 11: (*User has selected Record option.*)
  989. 396 ScreenInput.Input( NextFrame );
  990. ***** ^ not supported yet
  991. ***** ^ not supported yet
  992. ***** ^ not supported yet
  993. 397 (* This is the drop-down menu. *)
  994. 398 IF NextFrame # StrConv.ReturnedInt(DspFiles.MainFrame^.parent) THEN
  995. ***** ^ not supported yet
  996. ***** ^ not supported yet
  997. ***** ^ not supported yet
  998. ***** ^ not supported yet
  999. ***** ^ not supported yet
  1000. ***** ^ not supported yet
  1001. 399 CASE NextFrame OF
  1002. ***** ^ not supported yet
  1003. 400 5: (* user wants a Specific record *)
  1004. 401 ScreenInput.Input( NextFrame );
  1005. ***** ^ not supported yet
  1006. ***** ^ not supported yet
  1007. ***** ^ not supported yet
  1008. 402 (* Prompts for the name of the record. *)
  1009. 403 IF NextFrame = UserOps.EndCode THEN
  1010. ***** ^ not supported yet
  1011. ***** ^ not supported yet
  1012. ***** ^ not supported yet
  1013. 404 (*User wants to exit program.*)
  1014. 405 EXIT;
  1015. 406 ELSE
  1016. 407 ScreenInput.ReadInput( DspFiles.MainFrame,
  1017. ***** ^ not supported yet
  1018. ***** ^ not supported yet
  1019. ***** ^ not supported yet
  1020. ***** ^ not supported yet
  1021. 408 CurrentRecName, dumbool, 'name' );
  1022. ***** ^ not supported yet
  1023. ***** ^ not supported yet
  1024. 409 NextFrame := ProcessNamedRecord( CurrentRecName,
  1025. ***** ^ not supported yet
  1026. ***** ^ not supported yet
  1027. ***** ^ not supported yet
  1028. 410 CurrentRecNum );
  1029. ***** ^ not supported yet
  1030. 411 (*NextFrame should always be 2 at this point.*)
  1031. 412 END;
  1032. 413 | 1000: (* user wants Next record *)
  1033. 414 IF (CurrentRecNum <= ModBase3.NumberRecords(DataFile)) THEN
  1034. ***** ^ not supported yet
  1035. ***** ^ not supported yet
  1036. ***** ^ not supported yet
  1037. 415 INC( CurrentRecNum );
  1038. ***** ^ undeclared identifier
  1039. ***** ^ not supported yet
  1040. 416 NextFrame := ProcessNumberedRecord(
  1041. ***** ^ not supported yet
  1042. ***** ^ not supported yet
  1043. 417 CurrentRecNum, FALSE, '' );
  1044. ***** ^ not supported yet
  1045. 418 ELSE
  1046. 419 NextFrame := 2;
  1047. ***** ^ not supported yet
  1048. 420 END;
  1049. 421 | 1001: (* user wants Prev record *)
  1050. 422 IF (CurrentRecNum > VAL(LONGINT, 1)) THEN
  1051. ***** ^ undeclared identifier
  1052. ***** ^ not supported yet
  1053. 423 DEC( CurrentRecNum );
  1054. ***** ^ undeclared identifier
  1055. ***** ^ not supported yet
  1056. 424 NextFrame := ProcessNumberedRecord(
  1057. ***** ^ not supported yet
  1058. ***** ^ not supported yet
  1059. 425 CurrentRecNum, FALSE, '' );
  1060. ***** ^ not supported yet
  1061. 426 ELSE
  1062. 427 NextFrame := 2;
  1063. ***** ^ not supported yet
  1064. 428 END;
  1065. 429 END;
  1066. 430 END;
  1067. 431
  1068. 432 | 8: (*User has selected File option.*)
  1069. 433 CurrentRecName := '';
  1070. ***** ^ not supported yet
  1071. ***** ^ incompatible assignment
  1072. 434 CurrentRecNum := VAL( LONGINT, 1 );
  1073. ***** ^ undeclared identifier
  1074. ***** ^ not supported yet
  1075. 435 REPEAT
  1076. 436 ScreenInput.Input( NextFrame );
  1077. ***** ^ not supported yet
  1078. ***** ^ not supported yet
  1079. ***** ^ not supported yet
  1080. 437 (* Prompts for the name of the database file. *)
  1081. 438 ScreenInput.ReadInput( DspFiles.MainFrame,
  1082. ***** ^ not supported yet
  1083. ***** ^ not supported yet
  1084. ***** ^ not supported yet
  1085. ***** ^ not supported yet
  1086. 439 DbFileName, dumbool, 'filename' );
  1087. ***** ^ not supported yet
  1088. ***** ^ not supported yet
  1089. 440 StrEdit.CrunchBlanks( DbFileName );
  1090. ***** ^ not supported yet
  1091. ***** ^ not supported yet
  1092. ***** ^ not supported yet
  1093. 441 IF NOT GetNewDbFile( DataFile, IndexByName, DbFileName ) THEN
  1094. ***** ^ not supported yet
  1095. ***** ^ not supported yet
  1096. ***** ^ not supported yet
  1097. ***** ^ not supported yet
  1098. 442 EXIT;
  1099. 443 END;
  1100. 444 UNTIL ModBase3.OpenDBF(DataFile);
  1101. ***** ^ not supported yet
  1102. ***** ^ not supported yet
  1103. ***** ^ not supported yet
  1104. 445
  1105. 446 | 6: (*User has selected Import option.*)
  1106. 447 ScreenInput.Input( NextFrame );
  1107. ***** ^ not supported yet
  1108. ***** ^ not supported yet
  1109. ***** ^ not supported yet
  1110. 448 ScreenInput.ReadInput( DspFiles.MainFrame,
  1111. ***** ^ not supported yet
  1112. ***** ^ not supported yet
  1113. ***** ^ not supported yet
  1114. ***** ^ not supported yet
  1115. 449 AsciiFileName, dumbool, 'filename' );
  1116. ***** ^ not supported yet
  1117. ***** ^ not supported yet
  1118. 450 IF NOT ImportFromAscii( DataFile, IndexByName,
  1119. ***** ^ not supported yet
  1120. ***** ^ not supported yet
  1121. ***** ^ not supported yet
  1122. 451 AsciiFileName ) THEN
  1123. ***** ^ not supported yet
  1124. 452 IF NOT Confirm( 'Error importing file. Continue?' ) THEN
  1125. ***** ^ not supported yet
  1126. ***** ^ not supported yet
  1127. 453 EXIT;
  1128. 454 END;
  1129. 455 END;
  1130. 456 NextFrame := 2;
  1131. ***** ^ not supported yet
  1132. 457
  1133. 458 | 7: (*User has selected Export option.*)
  1134. 459 ScreenInput.Input( NextFrame );
  1135. ***** ^ not supported yet
  1136. ***** ^ not supported yet
  1137. ***** ^ not supported yet
  1138. 460 ScreenInput.ReadInput( DspFiles.MainFrame,
  1139. ***** ^ not supported yet
  1140. ***** ^ not supported yet
  1141. ***** ^ not supported yet
  1142. ***** ^ not supported yet
  1143. 461 AsciiFileName, dumbool, 'filename' );
  1144. ***** ^ not supported yet
  1145. ***** ^ not supported yet
  1146. 462 ExportToAscii( DataFile, AsciiFileName );
  1147. ***** ^ not supported yet
  1148. ***** ^ not supported yet
  1149. ***** ^ not supported yet
  1150. 463 NextFrame := 2;
  1151. ***** ^ not supported yet
  1152. 464
  1153. 465 | UserOps.EndCode: EXIT;
  1154. ***** ^ not supported yet
  1155. ***** ^ not supported yet
  1156. 466 ELSE
  1157. 467 IF NOT Confirm(
  1158. ***** ^ not supported yet
  1159. 468 'Unanticipated value returned from frame 2. Continue?') THEN
  1160. ***** ^ not supported yet
  1161. 469 EXIT;
  1162. 470 END;
  1163. 471 END;
  1164. 472 END;
  1165. 473 END;
  1166. 474 END AddrBook.
  1167. 691 errors