home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / BASIC / POWBASIC / LIBRARY1 / EXAMP2.ZIP / PB082190 < prev    next >
Text File  |  1990-08-23  |  9KB  |  219 lines

  1. all
  2. H#: 61555 S12/SPECTRA Publishing
  3.     20-Aug-90  12:02:00
  4. Sb: #61280-VERSION NUMBERS
  5. Fm: Mason Landstreet 71220,1547
  6. To: Bob Zale: PowerBASIC R&D 76304,1303 (X)
  7.  
  8. Bob,
  9.  
  10. Set up the code attheend to reflect a 3 digit number up to 512. This would
  11. allow you to bit map the ptches for up to 9 patches (a 5 digit number would
  12. take you up to 16 or so). This would show the patches and would allow a quick
  13. check for prerequisite patches.
  14.  
  15. Mason
  16.  
  17.  
  18. Press <CR> for next or type CHOICES !
  19. H#: 61536 S12/SPECTRA Publishing
  20.     20-Aug-90  10:07:47
  21. Sb: #61503-EXTERNAL STATEMENT
  22. Fm: George Green 70565,276
  23. To: Bob Zale: PowerBASIC R&D 76304,1303 (X)
  24.  
  25. <SIGH>...OK, THANKS!
  26.  -George \ex es
  27.  just washed my hands, can't do a thing with them...
  28.  
  29. Press <CR> for next or type CHOICES !
  30. H#: 61630 S12/SPECTRA Publishing
  31.     20-Aug-90  20:03:51
  32. Sb: #61503-#EXTERNAL STATEMENT
  33. Fm: Dan Robins 70007,3264
  34. To: Bob Zale: PowerBASIC R&D 76304,1303 (X)
  35.  
  36. Bob,
  37.   One quick question for you....
  38.   Why is it you can't name a .PBU file the same as the .PBU call itself:
  39.  
  40.   I call the .PBU file    DAN.PBU
  41.   I would like to call the SUB which has been made into a unit the same,
  42.   ie... SUB DAN (blah,blah,blah,blah)
  43.         .....
  44.         END SUB
  45.  
  46.   You also get the same duplicate name error at the $LINK "DAN.PBU" in a
  47. program which attempts to link in the .PBU.
  48.   Any thoughts or revelations about this?
  49.  
  50.   Dan
  51.  
  52. There is 1 Reply.
  53.  
  54. Press <CR> for next or type CHOICES !
  55. H#: 61684 S12/SPECTRA Publishing
  56.     21-Aug-90  07:38:08
  57. Sb: #61630-EXTERNAL STATEMENT
  58. Fm: Bob Zale: PowerBASIC R&D 76304,1303
  59. To: Dan Robins 70007,3264
  60.  
  61. True, Dan, you can't name a unit file the same as a procedure.  I'm afraid
  62. there's no "grand" explanation for this, just the way that the symbol table
  63. works, internal to the compiler.  We keep track of each procedure by the module
  64. (unit) name, as well as the procedure name itself.  This process requires that
  65. all names be unique, by design, rather than by some other hidden reason. 
  66. Obviously, this could therefore be changed, although at the possible expense of
  67. some extra code, and maybe some efficiency.  But if you folks need that change,
  68. well, let us know . . .
  69.   Anyone care to "vote" on this issue ? ? ?
  70.     Bob Zale (PowerBASIC R&D)
  71.  
  72. Press <CR> for next or type CHOICES !
  73. H#: 61558 S12/SPECTRA Publishing
  74.     20-Aug-90  12:25:36
  75. Sb: #ARRAY confusion
  76. Fm: George Green 70565,276
  77. To: [F] Spectra Support 75300,214 (X)
  78.  
  79. OK... Here's another problem I've come up with in my quest to convert over to
  80. PB units.
  81.  
  82. I have one particular SUB that works fine as a simple call, but when put in the
  83. UNIT gives error 488..."Array is Dynamic".
  84.  
  85. The array in question is DIMed using STATIC eg DIM STATIC PROBLEM (20). It's
  86. specified as PUBLIC in the main program and as EXTERNAL in the UNIT It's
  87. cleared often using ERASE in the main program.
  88.  
  89. Other than the above, the only other times it appears in the program are to
  90. assign its elements values, nowhere is it re-dimentioned.
  91.  
  92. Why does PB now think it's a DYNAMIC array?
  93.  
  94.  -George Green
  95.  
  96.  
  97.  
  98. There is 1 Reply.
  99.  
  100. Press <CR> for next or type CHOICES !
  101. H#: 61576 S12/SPECTRA Publishing
  102.     20-Aug-90  14:44:58
  103. Sb: #61558-#ARRAY confusion
  104. Fm: George Green 70565,276
  105. To: George Green 70565,276 (X)
  106.  
  107. ..Answering my own question?
  108.  
  109. It turns out that the arrays in question are assigned values via the UserEnt
  110. sub routine from the (fixed) TURBO BASIC DB TOOLKIT. Could it be that this sub
  111. is causing the problem? Anyway, I converted the arrays to DYNAMIC and the ERASE
  112. command to REDIM. This works, but doesn't tell me what the original problem
  113. was. BTW, putting the STATIC command in the SUB within the UNIT didn't help.
  114.  
  115.  -George Green \ex
  116.  
  117. There is 1 Reply.
  118.  
  119. Press <CR> for next or type CHOICES !
  120. H#: 61587 S12/SPECTRA Publishing
  121.     20-Aug-90  16:29:34
  122. Sb: #61576-ARRAY confusion
  123. Fm: Bob Zale: PowerBASIC R&D 76304,1303
  124. To: George Green 70565,276 (X)
  125.  
  126. George--
  127.   The answer is simply that all arrays which are declared PUBLIC and/or
  128. EXTERNAL must be dynamic by definition.  The reason is simply this: when
  129. compiling other modules, the compiler would have no way of knowing whether the
  130. array was dynamic or static.  In the example you gave, the unit file contains
  131. the ONLY reference anywhere as to whether the array is static or dynamic.  When
  132. PB is compiling the main module, and encounters the ERASE statement, it has no
  133. way of knowing which type of array it is.  Remember, ERASE is valid for both
  134. types of arrays, but the action taken is VERY different.
  135.   Bob Zale (PowerBASIC R&D)
  136.  
  137. Press <CR> for next or type CHOICES !
  138. H#: 61622 S12/SPECTRA Publishing
  139.     20-Aug-90  19:28:20
  140. Sb: #VERSION NUMBERS
  141. Fm: AL MUSELLA 76114,637
  142. To: Bob Zale: PowerBASIC R&D 76304,1303 (X)
  143.  
  144. Bob,
  145.    I can only reproduce the problem with a large program.  The
  146. individual modules work correctly, but when I put them together, it
  147. won't compile.  I am getting an error 462 message on the wrong line -   and
  148. possibly it may be the wrong error message.  The editor (and PBC)   tells me
  149. that the error is on line 86 of a module that is only 17 lines long!. I didn't
  150. locate this bug yet, but I know from experiance that it is something simple, 
  151. if PB tells me the correct line.  
  152.    The source code (including .pbus) is rather large (460K unzipped, or 150K
  153. after using PKZIP) and it would be easier if I could send you a
  154. 5 1/4" diskette.  Just let me know where to send it.
  155.    Maybe the problem is just the size of the files, and I should just be
  156. getting an out of memory error message instead of an error 462? - but PB and
  157. PBC both put me on the same line - and shouldn't run out of space on the same
  158. line, should they?
  159.                                           Al
  160.  
  161. BTW, why would anyone only use PATCH #3 without previous patches?
  162.    You should set it up so that a patch would only work if all previous patches
  163. were applied.  That way, everyone has the same version.  The most likely reason
  164. for not applying a patch is that the person doesn't know about it, or forgets
  165. to apply the patch. Stop us from making this mistake!!
  166.       
  167.  
  168. There is 1 Reply.
  169.  
  170. Press <CR> for next or type CHOICES !
  171. H#: 61694 S12/SPECTRA Publishing
  172.     21-Aug-90  07:50:45
  173. Sb: #61622-VERSION NUMBERS
  174. Fm: Bob Zale: PowerBASIC R&D 76304,1303
  175. To: AL MUSELLA 76114,637
  176.  
  177. Al --
  178.   Based upon the error messages, I agree it seems you are seeing a probable
  179. "bug" in PB.  I'd love to take a look at the code to see if there is some
  180. explanation for it, or else to get it corrected asap.  I'm sending you my
  181. mailing address by e-mail, so I'll look forward to getting your disk.
  182.   I agree, I can't imagine any reason why a person would want to install ONLY
  183. Patch3, but I suppose it's possible.  Perhaps they need PATCH3 at once for a
  184. programming project, but don't have the others readily available. Should we
  185. "put them out of business" by refusing to run?  I don't know for sure.  Also
  186. we've considered the possibility that we might have to issue some patches ONLY
  187. for specific hardware.  If PB didn't run properly on an ACME computer, we might
  188. need to issue a patch only for ACME users.  What then for the non-ACME folks? 
  189. I understand your concerns, but it a difficult choice.
  190.   Bob Zale (PowerBASIC R&D)
  191.  
  192. Press <CR> for next or type CHOICES !
  193. H#: 61640 S12/SPECTRA Publishing
  194.     20-Aug-90  21:02:35
  195. Sb: UTILITY UPLOAD
  196. Fm: AL MUSELLA 76114,637
  197. To: ALL
  198.  
  199. Hi,
  200.    Did you ever have the problem of hundreds of files accumulating
  201. in your PB directory, not knowing which ones were important or current?  I
  202. wrote and uploaded to the library a utility which, when supplied with the main
  203. filename, will use PKZIP (or you can substitute your favorite compression
  204. utility) to combine all of the files needed to compile the main file.  It will
  205. also optionally print out a list of which $include and $link files are present
  206. in your program.
  207.   You can ZIP the important files, then erase the rest(make sure you
  208. do a complete backup first, incase a mistake is made!!!!)
  209.   The program also includes source code for the dos find first and find next
  210. functions.
  211.   If you have any questions or comments, let me know. 
  212.   If anyone is interested, I am writing a MAKE utility, which will
  213. insure that all $link files in a program were compilied after the source was
  214. last changed, and if not current, will automatically compile them.   If anyone
  215. wants it I will be glad to upload this also.
  216.  
  217.                                    Al 
  218.  
  219.