home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / INVTORY.ZIP / INVTORY.DOC < prev    next >
Encoding:
Text File  |  1986-02-20  |  7.6 KB  |  143 lines

  1.                              INVTORY
  2.  
  3.     INVTOR┘á allow≤ yo⌡ t∩ kee≡ aε inventor∙ oµá selecteΣá items«  ì
  4. I⌠á wa≤ writteε anΣ compileΣ witΦ BorlanΣ International'≤ TURB╧ ▓ ì
  5. PASCAL«á  INVTORY.LB╥ contain≤ si° files║ INVTORY.PA╙ (thσ sourcσ ì
  6. code)¼á INVTORY.CO═ ¿ thσ compileΣ ruε file)¼ IEX.DA╘ (aε examplσ ì
  7. datß file)¼á IEX.IX╬ (ß Namσ inde° file)¼ anΣ IEX.IX├ (ß Typecodσ ì
  8. inde° file)«á  (Thσ inde° file≤ allo≈ searche≤ t∩ bσ madσ quickl∙ ì
  9. fo≥á entrie≤ iε thσ datß file)«á  Thσ sixtΦ file¼á i≤á thi≤á one¼ ì
  10. INVTORY.DOC¼á i⌠á give≤ instruction≤ oε ho≈ t∩ ente≥ datß anΣ ruε ì
  11. thσ INVTORY.COM file«á  I⌠ als∩ give≤ ß brieµ descriptioε oµá thσ ì
  12. prograφ structurσ iε INVTORY.PAS.
  13.                
  14.  
  15.                        Running INVTORY.COM
  16.  
  17. You invoke the inventory program by typing:
  18.  
  19.                            INVTORY.COM<CR>
  20.  
  21.    Afte≥á that¼á thσá prograφ i≤ completel∙ men⌡ driveε witΦá thσ ì
  22. possiblσ selection≤ beinτ showε a⌠ thσ bottoφ oµ thσ screen«  Thσ ì
  23. prograφá wil∞á firs⌠á asδ yo⌡ wherσ t∩ finΣ thσá datßá anΣá inde° ì
  24. files║á ente≥á Drivσ lette≥ (A,B,etc.)¼á Coloε (:)¼á anΣ ßá threσ ì
  25. lette≥á filσ namσ (IE╪ fo≥ example)«á  Thσ prograφ wil∞ looδá fo≥ ì
  26. thσ .DA╘ file¼á .IXN¼ anΣ .IX├ files«  Iµ the∙ arσ no⌠ found¼ yo⌡ ì
  27. wil∞á bσá askeΣá iµ yo⌡ wan⌠ t∩ creatσ them«á  Thi≤ give≤á yo⌡á ß ì
  28. chancσá t∩á abor⌠ iµ yo⌡ havσ madσ ß mistakσ iε typinτá thσá filσ ì
  29. names.
  30.    ┴á flo≈á diagraφá oµá thσ menu≤ i≤ showεá iεá Figurσá 1«á  Thσ ì
  31. U)pdate¼á L)ist¼á C)alcValue¼á Q)ui⌠ men⌡ i≤ thσ maiε menu«á  Yo⌡ ì
  32. makσá you≥á selectioε b∙ enterinτ thσ firs⌠ lette≥á oµá thσá men⌡ ì
  33. selection«  Thσ 'Uº wil∞ takσ yo⌡ t∩ thσ A)dd¼ F)ind¼ Q)ui⌠ menu«  ì
  34. Here¼ 'Aº wil∞ allo≈ yo⌡ t∩ adΣ item≤ t∩ thσ inventor∙ datß file« ì
  35. ┴á templatσ oµ datß entr∙ fiel≤ wil∞ bσ displayeΣ oε thσá screen«  ì
  36. Thσá datßá field≤á anΣ maximuφ numbe≥ oµ character≤ eacΦá arσá a≤ ì
  37. follows:
  38.  
  39. Field          # Characters   Comments
  40. _____          ____________   ________
  41. Name           15             The name of the item
  42. AddeΣ Inf∩     1╡             Fo≥ ß longe≥ namσ o≥ an∙ additiona∞
  43.                                information such as serial number.
  44. Location       2              One or two letter code. Ex: LV for
  45.                                 living Room or K for kitchen.
  46. Type Code      2              One or two letter code. Ex: TL for
  47.                                 tools or F for furniture.
  48. Quanity        3              # of this item.
  49. Date Obtained  6              The date of purchase: MMM YY.
  50. Original Cost  8              The value or cost when obtained.
  51. Present Value  8              The replacement cost of the item.
  52. Tota∞ Valuσáááá╣áááá          CalculateΣ: PresValue * Quanity. 
  53.  
  54.    ┴á <CR╛ caε bσ entereΣ fo≥ al∞ field≤ excep⌠ thσá Namσá field«  ì
  55. Iµ yo⌡ ente≥ <CR╛ fo≥ thσ Quanit∙ i⌠ wil∞ se⌠ i⌠ t∩ zero«  N∩ tw∩ ìèiteφá entrie≤á caεá havσ thσ samσ Namσ o≥ yo⌡ wil∞ ge⌠á aεá erro≥ ì
  56. message«  Iµ yo⌡ makσ ß mistakσ wheε enterinτ datß int∩ an∙ fielΣ ì
  57. yo⌡ caε correc⌠ i⌠ b∙ usinτ followinτ Wordsta≥ typσ commands:
  58.  
  59.           ^S : Move left one letter.
  60.           ^D : Move right one letter.
  61.           ^A : Move left one word.
  62.           ^F : Move right one word.
  63.           ^G : Delete one letter.
  64.           ^H : Backspace and delete one letter.
  65.           ^Y : Delete complete entry line.
  66.  
  67.    Thσá 'Fºá entr∙ wil∞ allo≈ t∩ searcΦ fo≥ ß particula≥ iteφá iε ì
  68. thσ datß file«á  First¼ yo⌡ wil∞ bσ prompteΣ t∩ ente≥ ß typecode«  ì
  69. Iµ yo⌡ d∩ no⌠ wan⌠ t∩ searcΦ fo≥ thσ firs⌠ iteφ iε thσ datßá filσ ì
  70. witΦ ß particula≥ typecodσ theε jus⌠ hi⌠ <CR>«á  Yo⌡ wil∞ theε bσ ì
  71. prompteΣ t∩ ente≥ thσ Namσ anΣ AddeΣ Info«á  Thσ prograφ wil∞ usσ ì
  72. thi≤á t∩ acces≤ thσ Namσ inde° filσ t∩ finΣ ß Namσ whicΦá matche≤ ì
  73. you≥á entry«á  Iµ onσ i≤ found¼á tha⌠ iteφ wil∞ bσ retrieveΣ froφ ì
  74. thσ datß filσ anΣ displayeΣ oε thσ screen«á  Thσ datß i≤ arrangeΣ ì
  75. iεá thσá datß filσ iε alphabetica∞ orde≥ accordinτá t∩á thσá namσ ì
  76. fielΣá entries¼á s∩á afte≥ ß matcΦ i≤ founΣ yo⌡á caεá single-ste≡ ì
  77. forwarΣá o≥ backwarΣ througΦ thσ datß file«á  T∩ sto≡ thσ single-ì
  78. steppinτá modσá jus⌠ typσ 'Q'¼á  thi≤ wil∞ givσá yo⌡á thσá E)dit¼ ì
  79. D)elete¼á Q)ui⌠ menu«á  A⌠ thi≤ timσ yo⌡ caε edi⌠ tha⌠ entr∙ disì
  80. playeΣ oε thσ screeε o≥ deletσ it« Also¼ iµ yo⌡ typσ 'Qº yo⌡ wil∞ ì
  81. leavσá thσ iteφ unchangeΣ anΣ returε t∩ thσá A)dd¼á F)ind¼á Q)ui⌠ ì
  82. menu«  Wheε yo⌡ arσ editting¼ yo⌡ caε typσ <CR╛ t∩ leavσ thσ datß ì
  83. field≤ unchanged« 
  84.    T∩á lis⌠ ou⌠ thσ item≤ iε thσ datß filσ ente≥ 'Lº a⌠ thσá maiε ì
  85. menu«á  Yo⌡á wil∞ theε bσ prompteΣ t∩ specif∙ thσ outpu⌠á device╗ ì
  86. eithe≥á t∩á ßá printe≥ o≥ t∩ thσ screen«á  Yo⌡á caεá theεá choosσ ì
  87. whethe≥ yo⌡ wan⌠ thσ listinτ t∩ bσ sorteΣ o≥ not«á  Yo⌡ caεá havσ ì
  88. thσá item≤á listeΣá alphabeticall∙ b∙ Namσ o≥á alphabeticall∙á b∙ ì
  89. Typecode«á  Thσ nex⌠ men⌡ wil∞ allo≈ yo⌡ t∩ selec⌠ wha⌠ yo⌡á wan⌠ ì
  90. listed«á  Aεá 'Lºá entr∙á wil∞ promp⌠ yo⌡ t∩ ente≥ ß onσá o≥á tw∩ ì
  91. characte≥ locatioε code«á  Al∞ datß item≤ matchinτ tha⌠ codσ wil∞ ì
  92. theε bσ outpu⌠ t∩ thσ selecteΣ device«á   ┴ 'Tº entr∙ wil∞ promp⌠ ì
  93. yo⌡á fo≥á ß onσ o≥ tw∩ characte≥ Typecodσ tha⌠ wil∞á bσá useΣá t∩ ì
  94. selec⌠ thσ item≤ t∩ bσ listed«á  Iµ yo⌡ wan⌠ thσ entirσ datß filσ ì
  95. content≤ listed¼ ente≥ 'Z'.
  96.    Selectinτá 'Cº a⌠ thσ maiε men⌡ wil∞ allo≈ yo⌡ t∩á selectivel∙ ì
  97. calculatσá anΣá outpu⌠ thσ suφ oµ thσ Presen⌠ Value≤ oµ thσá datß ì
  98. items«  A≤ witΦ thσ Lis⌠ command¼ yo⌡ caε selec⌠ whethe≥ yo⌡ wan⌠ ì
  99. t∩á senΣ thσ outpu⌠ t∩ thσ printe≥ o≥ t∩ thσ screeε anΣ selec⌠á ß ì
  100. templatσ iµ desired.
  101.    T∩ exi⌠ thσ program¼ ente≥ 'Qº a⌠ thσ maiε menu«  Thσ datß anΣ ì
  102. inde°á file≤ will then bσ closeΣ anΣ contro∞ wil∞ bσ returneΣá t∩ ì
  103. thσ operatinτ system.
  104.  
  105.  
  106.  
  107.  
  108.  
  109. è                        Program Structure
  110.  
  111.    INVTORY.PA╙ contain≤ thσ Pasca∞ sourcσ code«á  I⌠ wa≤ compileΣ ì
  112. witΦ BorlanΣ International'≤ Turb∩ ▓ Pascal«á  T∩ compilσ i⌠á yo⌡ ì
  113. woulΣá als∩ neeΣ thσ Turb∩ Toolbo° file≤ ACCESS.BOX¼á GETKEY.BOX¼ ì
  114. ADDKEY.BOX¼ AN─ DELKEY.BO╪ whicΦ arσ useΣ b∙ INVTORY.
  115.   Thσá firs⌠ sectioε oµ thσ inventor∙ prograφ i≤ thσá declaratioε ì
  116. sectioε whicΦ define≤ thσ globa∞ constants¼ variables¼ anΣ types«  ì
  117. ┴á recorΣá typσ i≤ useΣ t∩ holΣ thσ datß entrie≤ fo≥á eacΦá item«  ì
  118. Al∞ oµ thσ recorΣ field≤ arσ strinτ types«á  Thσ Quanit∙ anΣ cos⌠ ì
  119. field≤ arσ converteΣ t∩ real≤ wheε calculation≤ arσ performed.
  120.    Thσá nex⌠ sectioε contain≤ thσ Pasca∞ subroutines«á  EacΦ subì
  121. routinσá ha≤ ß headinτ blocδ whicΦ give≤ ß shor⌠á descriptioεá oµ ì
  122. it≤á functioε anΣ tell≤ wha⌠ subroutine≤ i⌠ call≤ anΣ wha⌠ i⌠ wa≤ ì
  123. calleΣ by«  The last section is thσ bod∙ oµ thσ maiε prograφ.
  124.  
  125.  
  126. |----------------------------------------------------------------
  127. |                    U)pdate, L)ist, C)alcValue, Q)uit          |
  128. |                      ||     ||          ||                    |
  129. |        A)dd¼áF)ind¼áQ)ui⌠á  ||  Outpu⌠áDev║áP)rinter¼ S)creen |
  130. |                |            ||          ||                    |
  131. |     N)ext, P)revious, Q)uit || Sort by: C)ode N)ame U)nsorted |
  132. |         \     /             ||          ||                    |
  133. |     E)dit, D)elete, Q)uit   || Template? L)ocation T)ypecode  |
  134. |                             ||              Z)none            |
  135. |                             ||                                |
  136. |                 Output Dev: P)rinter, S)creen                 |
  137. |                             ||                                |
  138. |               Sort By: c)ode, N)ame, U)nsorted                |
  139. |                             ||                                |
  140. |            Template? L)ocation, T)ypecode, Z)none             |
  141. |_______________________________________________________________|
  142.                      Figure 1. Menu Commands     
  143.