ITEMS.LST 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. Listing:
  2. 1 IMPLEMENTATION MODULE Items;
  3. 2 (*
  4. 3 Copyright (C) 1988,1989 Jensen & Partners International
  5. 4 *)
  6. 5
  7. 6 IMPORT Globals, Window, IO, Str, Misc, Btree;
  8. 7 FROM Globals IMPORT GetMenu, ItemIndex, ItemData;
  9. ***** ^ duplicate identifier
  10. 8
  11. 9 VAR
  12. 10 ItemWin, lastWin : Window.WinType;
  13. ***** ^ not supported yet
  14. 11 OnScreen : BOOLEAN;
  15. 12 EmptyItem, BlankItem : ItemRec;
  16. ***** ^ undeclared identifier
  17. 13 keyPressed : CHAR;
  18. 14
  19. 15 PROCEDURE PressAKey( txt : ARRAY OF CHAR);
  20. ***** ^ not supported yet
  21. 16 VAR
  22. 17 ch : CHAR;
  23. 18 BEGIN
  24. 19 Window.TextColor(Globals.PromptFore);
  25. ***** ^ not supported yet
  26. ***** ^ not supported yet
  27. ***** ^ not supported yet
  28. ***** ^ not supported yet
  29. 20 Window.TextBackground(Globals.DisplayBack);
  30. ***** ^ not supported yet
  31. ***** ^ not supported yet
  32. ***** ^ not supported yet
  33. ***** ^ not supported yet
  34. 21 Globals.WriteAt(9,1,txt);
  35. ***** ^ not supported yet
  36. ***** ^ not supported yet
  37. ***** ^ not supported yet
  38. 22 Window.GotoXY(30,9);
  39. ***** ^ not supported yet
  40. ***** ^ not supported yet
  41. ***** ^ not supported yet
  42. 23 ch := IO.RdKey();
  43. ***** ^ not supported yet
  44. ***** ^ not supported yet
  45. ***** ^ not supported yet
  46. 24 Window.GotoXY(1,9);
  47. ***** ^ not supported yet
  48. ***** ^ not supported yet
  49. ***** ^ not supported yet
  50. 25 Window.ClrEol();
  51. ***** ^ not supported yet
  52. ***** ^ not supported yet
  53. ***** ^ not supported yet
  54. 26 keyPressed := CAP(ch);
  55. ***** ^ undeclared identifier
  56. ***** ^ not supported yet
  57. 27 END PressAKey;
  58. ***** ^ not supported yet
  59. 28
  60. 29
  61. 30 PROCEDURE MakeKey( keyA, myItemA : ADDRESS );
  62. ***** ^ undeclared identifier
  63. 31 VAR
  64. 32 key : POINTER TO Globals.FileKey;
  65. ***** ^ not supported yet
  66. 33 myItem : POINTER TO ItemRec;
  67. ***** ^ undeclared identifier
  68. 34 BEGIN
  69. 35 key := keyA;
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. 36 myItem := myItemA;
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. 37 Str.Copy(key^,myItem^.INum);
  76. ***** ^ not supported yet
  77. ***** ^ not supported yet
  78. ***** ^ not supported yet
  79. ***** ^ not supported yet
  80. ***** ^ not supported yet
  81. 38 END MakeKey;
  82. ***** ^ not supported yet
  83. 39
  84. 40 PROCEDURE Display( anItem : ItemRec );
  85. ***** ^ undeclared identifier
  86. 41 (*
  87. 42 This procedure displays the item record on the screen.
  88. 43 *)
  89. 44 VAR
  90. 45 S : ARRAY[0..10] OF CHAR;
  91. ***** ^ not supported yet
  92. ***** ^ not supported yet
  93. 46 ok : BOOLEAN;
  94. 47 BEGIN
  95. 48 Window.TextColor(Globals.DataFore);
  96. ***** ^ not supported yet
  97. ***** ^ not supported yet
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. 49 Window.TextBackground(Globals.DataBack);
  101. ***** ^ not supported yet
  102. ***** ^ not supported yet
  103. ***** ^ not supported yet
  104. ***** ^ not supported yet
  105. 50 WITH anItem DO
  106. ***** ^ not supported yet
  107. 51 Globals.WriteAt(1,15,INum);
  108. ***** ^ not supported yet
  109. ***** ^ not supported yet
  110. ***** ^ undeclared identifier
  111. 52 Globals.WriteAt(2,15,Description);
  112. ***** ^ not supported yet
  113. ***** ^ not supported yet
  114. ***** ^ undeclared identifier
  115. 53 Globals.WriteAt(3,15,Mfgr);
  116. ***** ^ not supported yet
  117. ***** ^ not supported yet
  118. ***** ^ undeclared identifier
  119. 54 Globals.WriteAt(3,55,PartNum);
  120. ***** ^ not supported yet
  121. ***** ^ not supported yet
  122. ***** ^ undeclared identifier
  123. 55 Globals.WriteAt(7,15,Supplier);
  124. ***** ^ not supported yet
  125. ***** ^ not supported yet
  126. ***** ^ undeclared identifier
  127. 56 Window.GotoXY(15,5); IO.WrCard(QOHand,-10);
  128. ***** ^ not supported yet
  129. ***** ^ not supported yet
  130. ***** ^ not supported yet
  131. ***** ^ not supported yet
  132. ***** ^ not supported yet
  133. ***** ^ undeclared identifier
  134. ***** ^ not supported yet
  135. 57 Window.GotoXY(55,5); IO.WrCard(QOOrder,-10);
  136. ***** ^ not supported yet
  137. ***** ^ not supported yet
  138. ***** ^ not supported yet
  139. ***** ^ not supported yet
  140. ***** ^ not supported yet
  141. ***** ^ undeclared identifier
  142. ***** ^ not supported yet
  143. 58 Str.FixRealToStr(Cost,2,S,ok);
  144. ***** ^ not supported yet
  145. ***** ^ not supported yet
  146. ***** ^ undeclared identifier
  147. ***** ^ not supported yet
  148. ***** ^ not supported yet
  149. 59 Globals.WriteAt(6,15," ");
  150. ***** ^ not supported yet
  151. ***** ^ not supported yet
  152. ***** ^ not supported yet
  153. 60 IF ok = FALSE THEN
  154. 61 Globals.WriteAt(6,15,"???");
  155. ***** ^ not supported yet
  156. ***** ^ not supported yet
  157. ***** ^ not supported yet
  158. 62 ELSE
  159. 63 Globals.WriteAt(6,15,S);
  160. ***** ^ not supported yet
  161. ***** ^ not supported yet
  162. ***** ^ not supported yet
  163. 64 END;
  164. 65 Str.FixRealToStr(Retail,2,S,ok);
  165. ***** ^ not supported yet
  166. ***** ^ not supported yet
  167. ***** ^ undeclared identifier
  168. ***** ^ not supported yet
  169. ***** ^ not supported yet
  170. 66 Globals.WriteAt(6,55," ");
  171. ***** ^ not supported yet
  172. ***** ^ not supported yet
  173. ***** ^ not supported yet
  174. 67 IF ok = FALSE THEN
  175. 68 Globals.WriteAt(6,55,"???");
  176. ***** ^ not supported yet
  177. ***** ^ not supported yet
  178. ***** ^ not supported yet
  179. 69 ELSE
  180. 70 Globals.WriteAt(6,55,S);
  181. ***** ^ not supported yet
  182. ***** ^ not supported yet
  183. ***** ^ not supported yet
  184. 71 END;
  185. 72 END;
  186. ***** ^ not supported yet
  187. 73 END Display;
  188. ***** ^ not supported yet
  189. 74
  190. 75 PROCEDURE Clear( );
  191. 76 (*
  192. 77 This procedure clears the previous item information.
  193. 78 *)
  194. 79 BEGIN
  195. 80 Display(BlankItem);
  196. ***** ^ not supported yet
  197. ***** ^ not supported yet
  198. 81 END Clear;
  199. ***** ^ not supported yet
  200. 82
  201. 83 PROCEDURE Template( );
  202. 84 (*
  203. 85 This procedure un-hides the item display window and displays
  204. 86 the field names.
  205. 87 *)
  206. 88 BEGIN
  207. 89 lastWin := Window.Used();
  208. ***** ^ not supported yet
  209. ***** ^ not supported yet
  210. ***** ^ not supported yet
  211. ***** ^ not supported yet
  212. 90 Window.Use(ItemWin);
  213. ***** ^ not supported yet
  214. ***** ^ not supported yet
  215. ***** ^ not supported yet
  216. 91 Window.PutOnTop(ItemWin);
  217. ***** ^ not supported yet
  218. ***** ^ not supported yet
  219. ***** ^ not supported yet
  220. 92 Clear();
  221. ***** ^ not supported yet
  222. ***** ^ not supported yet
  223. 93 OnScreen := TRUE;
  224. 94 END Template;
  225. ***** ^ not supported yet
  226. 95
  227. 96 PROCEDURE Input( VAR anItem : ItemRec; Clear : BOOLEAN );
  228. ***** ^ undeclared identifier
  229. 97 (*
  230. 98 This procedure inputs the item information from the user.
  231. 99 If Clear is TRUE, then the information is cleared before the
  232. 100 user enters new information. If Clear is FALSE, Display() is
  233. 101 called first to show the current information, and it is then
  234. 102 edited.
  235. 103 *)
  236. 104 VAR
  237. 105 ok,
  238. 106 Continue : BOOLEAN;
  239. 107 Field : CARDINAL;
  240. 108 ch : CHAR;
  241. 109 S : ARRAY[0..10] OF CHAR;
  242. ***** ^ not supported yet
  243. ***** ^ not supported yet
  244. 110 BEGIN
  245. 111 IF Clear THEN
  246. 112 anItem := EmptyItem;
  247. ***** ^ not supported yet
  248. ***** ^ not supported yet
  249. 113 Display(BlankItem);
  250. ***** ^ not supported yet
  251. ***** ^ not supported yet
  252. 114 END;
  253. 115 Display(anItem);
  254. ***** ^ not supported yet
  255. ***** ^ not supported yet
  256. 116 Continue := TRUE;
  257. 117 Field := 1;
  258. 118 WITH anItem DO
  259. ***** ^ not supported yet
  260. 119 WHILE (Continue) DO
  261. 120 CASE Field OF
  262. 121 1: Window.GotoXY(15,1); Misc.InputStr(INum,10);
  263. ***** ^ not supported yet
  264. ***** ^ not supported yet
  265. ***** ^ not supported yet
  266. ***** ^ not supported yet
  267. ***** ^ not supported yet
  268. ***** ^ undeclared identifier
  269. ***** ^ not supported yet
  270. 122 | 2: Window.GotoXY(15,2); Misc.InputStr(Description,25);
  271. ***** ^ not supported yet
  272. ***** ^ not supported yet
  273. ***** ^ not supported yet
  274. ***** ^ not supported yet
  275. ***** ^ not supported yet
  276. ***** ^ undeclared identifier
  277. ***** ^ not supported yet
  278. 123 | 3: Window.GotoXY(15,3); Misc.InputStr(Mfgr,20);
  279. ***** ^ not supported yet
  280. ***** ^ not supported yet
  281. ***** ^ not supported yet
  282. ***** ^ not supported yet
  283. ***** ^ not supported yet
  284. ***** ^ undeclared identifier
  285. ***** ^ not supported yet
  286. 124 | 4: Window.GotoXY(55,3); Misc.InputStr(PartNum,10);
  287. ***** ^ not supported yet
  288. ***** ^ not supported yet
  289. ***** ^ not supported yet
  290. ***** ^ not supported yet
  291. ***** ^ not supported yet
  292. ***** ^ undeclared identifier
  293. ***** ^ not supported yet
  294. 125 | 5: Window.GotoXY(15,5);
  295. ***** ^ not supported yet
  296. ***** ^ not supported yet
  297. ***** ^ not supported yet
  298. 126 Str.CardToStr(LONGCARD(QOHand),S,10,ok);
  299. ***** ^ not supported yet
  300. ***** ^ not supported yet
  301. ***** ^ undeclared identifier
  302. ***** ^ undeclared identifier
  303. ***** ^ not supported yet
  304. ***** ^ not supported yet
  305. 127 Misc.InputStr(S,10);
  306. ***** ^ not supported yet
  307. ***** ^ not supported yet
  308. ***** ^ not supported yet
  309. ***** ^ not supported yet
  310. 128 QOHand := CARDINAL(Str.StrToCard(S,10,ok));
  311. ***** ^ undeclared identifier
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. ***** ^ not supported yet
  315. ***** ^ not supported yet
  316. 129 | 6: Window.GotoXY(55,5);
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. ***** ^ not supported yet
  320. 130 Str.CardToStr(LONGCARD(QOOrder),S,10,ok);
  321. ***** ^ not supported yet
  322. ***** ^ not supported yet
  323. ***** ^ undeclared identifier
  324. ***** ^ undeclared identifier
  325. ***** ^ not supported yet
  326. ***** ^ not supported yet
  327. 131 Misc.InputStr(S,10);
  328. ***** ^ not supported yet
  329. ***** ^ not supported yet
  330. ***** ^ not supported yet
  331. ***** ^ not supported yet
  332. 132 QOOrder := CARDINAL(Str.StrToCard(S,10,ok));
  333. ***** ^ undeclared identifier
  334. ***** ^ not supported yet
  335. ***** ^ not supported yet
  336. ***** ^ not supported yet
  337. ***** ^ not supported yet
  338. 133 | 7: Window.GotoXY(15,6);
  339. ***** ^ not supported yet
  340. ***** ^ not supported yet
  341. ***** ^ not supported yet
  342. 134 Str.FixRealToStr(Cost,2,S,ok);
  343. ***** ^ not supported yet
  344. ***** ^ not supported yet
  345. ***** ^ undeclared identifier
  346. ***** ^ not supported yet
  347. ***** ^ not supported yet
  348. 135 Misc.InputStr(S,10);
  349. ***** ^ not supported yet
  350. ***** ^ not supported yet
  351. ***** ^ not supported yet
  352. ***** ^ not supported yet
  353. 136 Cost := Str.StrToReal(S,ok);
  354. ***** ^ undeclared identifier
  355. ***** ^ not supported yet
  356. ***** ^ not supported yet
  357. ***** ^ not supported yet
  358. ***** ^ not supported yet
  359. 137 | 8: Window.GotoXY(55,6);
  360. ***** ^ not supported yet
  361. ***** ^ not supported yet
  362. ***** ^ not supported yet
  363. 138 Str.FixRealToStr(Retail,2,S,ok);
  364. ***** ^ not supported yet
  365. ***** ^ not supported yet
  366. ***** ^ undeclared identifier
  367. ***** ^ not supported yet
  368. ***** ^ not supported yet
  369. 139 Misc.InputStr(S,10);
  370. ***** ^ not supported yet
  371. ***** ^ not supported yet
  372. ***** ^ not supported yet
  373. ***** ^ not supported yet
  374. 140 Retail := Str.StrToReal(S,ok);
  375. ***** ^ undeclared identifier
  376. ***** ^ not supported yet
  377. ***** ^ not supported yet
  378. ***** ^ not supported yet
  379. ***** ^ not supported yet
  380. 141 | 9: Window.GotoXY(15,7); Misc.InputStr(Supplier,10);
  381. ***** ^ not supported yet
  382. ***** ^ not supported yet
  383. ***** ^ not supported yet
  384. ***** ^ not supported yet
  385. ***** ^ not supported yet
  386. ***** ^ undeclared identifier
  387. ***** ^ not supported yet
  388. 142 END; (* case *)
  389. 143 INC(Field);
  390. ***** ^ undeclared identifier
  391. ***** ^ not supported yet
  392. 144 IF Field >= 10 THEN
  393. 145 Window.TextColor(Globals.PromptFore);
  394. ***** ^ not supported yet
  395. ***** ^ not supported yet
  396. ***** ^ not supported yet
  397. ***** ^ not supported yet
  398. 146 Window.TextBackground(Globals.DisplayBack);
  399. ***** ^ not supported yet
  400. ***** ^ not supported yet
  401. ***** ^ not supported yet
  402. ***** ^ not supported yet
  403. 147 Globals.WriteAt(9,1,"Are these ok? ");
  404. ***** ^ not supported yet
  405. ***** ^ not supported yet
  406. ***** ^ not supported yet
  407. 148 Window.GotoXY(15,9);
  408. ***** ^ not supported yet
  409. ***** ^ not supported yet
  410. ***** ^ not supported yet
  411. 149 ch := IO.RdKey();
  412. ***** ^ not supported yet
  413. ***** ^ not supported yet
  414. ***** ^ not supported yet
  415. 150 Globals.WriteAt(9,1," ");
  416. ***** ^ not supported yet
  417. ***** ^ not supported yet
  418. ***** ^ not supported yet
  419. 151 IF CAP(ch) = 'Y' THEN
  420. ***** ^ undeclared identifier
  421. ***** ^ not supported yet
  422. 152 Continue := FALSE;
  423. 153 ELSE
  424. 154 Field := 1;
  425. 155 Window.TextColor(Globals.DataFore);
  426. ***** ^ not supported yet
  427. ***** ^ not supported yet
  428. ***** ^ not supported yet
  429. ***** ^ not supported yet
  430. 156 Window.TextBackground(Globals.DataBack);
  431. ***** ^ not supported yet
  432. ***** ^ not supported yet
  433. ***** ^ not supported yet
  434. ***** ^ not supported yet
  435. 157 END; (* if *)
  436. 158 END; (* if *)
  437. 159 END; (* while *)
  438. 160 END; (* with *)
  439. ***** ^ not supported yet
  440. 161 END Input;
  441. ***** ^ not supported yet
  442. 162
  443. 163 PROCEDURE Search( VAR anItem : ItemRec ) : BOOLEAN ;
  444. ***** ^ undeclared identifier
  445. 164 (*
  446. 165 The key fields from anItem are checked for data. If they
  447. 166 are filled, that information is used to search. Otherwise,
  448. 167 this procedure asks the user for search information, and then
  449. 168 searches for the given record. If it is found, it is copied to
  450. 169 anItem, and TRUE is returned. If it is not found, FALSE is
  451. 170 returned.
  452. 171 *)
  453. 172 VAR
  454. 173 searchStr : Globals.FileKey;
  455. ***** ^ not supported yet
  456. 174 ch : CHAR;
  457. 175 BEGIN
  458. 176 Clear();
  459. ***** ^ not supported yet
  460. ***** ^ not supported yet
  461. 177 IF anItem.INum[0] > ' ' THEN
  462. ***** ^ not supported yet
  463. ***** ^ not supported yet
  464. ***** ^ not supported yet
  465. 178 Str.Copy(searchStr,anItem.INum);
  466. ***** ^ not supported yet
  467. ***** ^ not supported yet
  468. ***** ^ not supported yet
  469. ***** ^ not supported yet
  470. ***** ^ not supported yet
  471. 179 ELSE
  472. 180 Window.GotoXY(15,1);
  473. ***** ^ not supported yet
  474. ***** ^ not supported yet
  475. ***** ^ not supported yet
  476. 181 searchStr := "";
  477. ***** ^ not supported yet
  478. 182 Misc.InputStr(searchStr,10);
  479. ***** ^ not supported yet
  480. ***** ^ not supported yet
  481. ***** ^ not supported yet
  482. ***** ^ not supported yet
  483. 183 END;
  484. 184 IF searchStr[0] <= ' ' THEN
  485. ***** ^ not supported yet
  486. ***** ^ not supported yet
  487. 185 Clear();
  488. ***** ^ not supported yet
  489. ***** ^ not supported yet
  490. 186 RETURN FALSE;
  491. 187 END;
  492. 188 Str.Caps(searchStr);
  493. ***** ^ not supported yet
  494. ***** ^ not supported yet
  495. ***** ^ not supported yet
  496. 189 (* WriteAt(sx, sy, "Searching..."); *)
  497. 190 IF Btree.Find(ItemIndex,searchStr,anItem) THEN
  498. ***** ^ not supported yet
  499. ***** ^ not supported yet
  500. ***** ^ not supported yet
  501. ***** ^ not supported yet
  502. ***** ^ not supported yet
  503. 191 Display(anItem);
  504. ***** ^ not supported yet
  505. ***** ^ not supported yet
  506. 192 (* WriteAt(sx, sy, " "); *)
  507. 193 ELSE
  508. 194 IF Btree.Search(ItemIndex,searchStr,anItem) THEN
  509. ***** ^ not supported yet
  510. ***** ^ not supported yet
  511. ***** ^ not supported yet
  512. ***** ^ not supported yet
  513. ***** ^ not supported yet
  514. 195 Display(anItem);
  515. ***** ^ not supported yet
  516. ***** ^ not supported yet
  517. 196 REPEAT
  518. 197 GetMenu("N)ext P)revious or T)his One? ",
  519. ***** ^ not supported yet
  520. ***** ^ not supported yet
  521. 198 Globals.CharSet{'N','P','T'}, ch);
  522. ***** ^ not supported yet
  523. ***** ^ not supported yet
  524. ***** ^ not supported yet
  525. ***** ^ not supported yet
  526. ***** ^ not supported yet
  527. 199 CASE ch OF
  528. 200 'N' : IF Btree.Next(ItemIndex,anItem) THEN
  529. 201 Clear();
  530. 202 Display(anItem);
  531. 203 ELSE
  532. 204 Globals.Beep();
  533. 205 END;
  534. 206 | 'P' : IF Btree.Prev(ItemIndex,anItem) THEN
  535. 207 Clear();
  536. 208 Display(anItem);
  537. 209 ELSE
  538. 210 Globals.Beep();
  539. 211 END;
  540. 212 | 'T' : ;
  541. 213 ELSE
  542. 214 Globals.Beep();
  543. 215 END;
  544. 216 UNTIL ch = 'T';
  545. 217 ELSE
  546. 218 Globals.WriteAt(8,1,"Failed Search!");
  547. 219 PressAKey("Press Any Key to Continue... ");
  548. 220 Window.TextColor(Globals.PromptFore);
  549. 221 Window.TextBackground(Globals.DisplayBack);
  550. 222 Globals.WriteAt(8,1," ");
  551. 223 RETURN FALSE;
  552. 224 END;
  553. 225 END;
  554. 226 PressAKey("E)dit, D)elete, or Q)uit? ");
  555. 227 IF keyPressed = 33C THEN
  556. 228 RETURN FALSE;
  557. 229 ELSIF keyPressed = 'E' THEN
  558. 230 Btree.Delete(ItemData);
  559. 231 Input(anItem,FALSE);
  560. 232 Btree.Add(ItemData,anItem,SIZE(anItem));
  561. 233 RETURN TRUE;
  562. 234 ELSIF keyPressed = 'D' THEN
  563. 235 Btree.Delete(ItemData);
  564. 236 RETURN FALSE;
  565. 237 ELSE
  566. 238 RETURN TRUE;
  567. 239 END;
  568. 240 END Search;
  569. 241
  570. 242 PROCEDURE Close( );
  571. 243 (*
  572. 244 This procedure removes the item display window from the screen.
  573. 245 *)
  574. 246 BEGIN
  575. 247 Window.Hide(ItemWin);
  576. 248 Window.Use(lastWin);
  577. 249 Window.PutOnTop(lastWin);
  578. 250 OnScreen := FALSE;
  579. 251 END Close;
  580. 252
  581. 253 BEGIN
  582. 254 ItemWin := Window.Open( Window.WinDef( 0, 4, 79, 14,
  583. 255 Window.White,Window.Black,TRUE,FALSE,TRUE,TRUE,
  584. 256 Window.SingleFrame,Window.White,Window.Black) );
  585. 257 Window.SetFrame(ItemWin,Window.SingleFrame,Globals.DisplayBorder,
  586. 258 Globals.DisplayBack);
  587. 259 Window.Use(ItemWin);
  588. 260 Window.TextColor(Globals.DisplayFore);
  589. 261 Window.TextBackground(Globals.DisplayBack);
  590. 262 Window.Clear();
  591. 263 Globals.WriteAt(1,1,"Item Number:");
  592. 264 Globals.WriteAt(2,1,"Description:");
  593. 265 Globals.WriteAt(3,1,"Manufacturer:");
  594. 266 Globals.WriteAt(3,40,"Part Number:");
  595. 267 Globals.WriteAt(5,1,"On Hand:");
  596. 268 Globals.WriteAt(5,40,"On Order:");
  597. 269 Globals.WriteAt(6,1,"Cost:");
  598. 270 Globals.WriteAt(6,40,"Retail:");
  599. 271 Globals.WriteAt(7,1,"Supplier:");
  600. 272
  601. 273 WITH BlankItem DO
  602. 274 Str.Copy(INum," ");
  603. 275 Str.Copy(Description," ");
  604. 276 Str.Copy(PartNum," ");
  605. 277 Str.Copy(Mfgr," ");
  606. 278 Str.Copy(Supplier," ");
  607. 279 QOHand := 0;
  608. 280 QOOrder := 0;
  609. 281 Cost := 0.0;
  610. 282 Retail := 0.0;
  611. 283 END;
  612. 284
  613. 285 WITH EmptyItem DO
  614. 286 INum := "";
  615. 287 Description := "";
  616. 288 PartNum := "";
  617. 289 Mfgr := "";
  618. 290 Supplier := "";
  619. 291 QOHand := 0;
  620. 292 QOOrder := 0;
  621. 293 Cost := 0.0;
  622. 294 Retail := 0.0;
  623. 295 END;
  624. 296
  625. 297 OnScreen := FALSE;
  626. 298 END Items.
  627. 327 errors