home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / BASIC / POWBASIC / LIBRARY2 / LISVAR.ZIP / PUBVARS.DOC < prev   
Text File  |  1990-05-12  |  1KB  |  30 lines

  1. When your POWER-BASIC units contain EXTERNAL variables, you have to declare
  2. them all PUBLIC in the main file. This utility does it for me! The output
  3. file is a tidy alphabetized list of these variables, to be $INCLUDE'ed in
  4. the main file. No more ERROR 503's !!
  5.  
  6. 5-12-90: Just as soon as I uploaded this, I knew I had to improve on it. 
  7. Now it gets the name of your MAIN program file, searches it for the $LINK 
  8. statements, converts the filenames from *.PBU to *.BAS, opens each of them 
  9. in turn to be searched for EXTERNAL statements. It makes a backup of any 
  10. prior Public Variables List (*.PV) that it finds, but it won't overwrite 
  11. anything without your OK. 
  12.  
  13. In a main program, I found it necessary to do things in a particular order: 
  14. DIM Statements for public arrays first, then $LINK statements, then PUBLIC 
  15. statements. 
  16.  
  17. Part of the fun of writing this was using many of the new statements Bob 
  18. has added. (I'm amazed by the fact that he single-handedly wrote 
  19. Turbo/PowerBasic!) I did have some trouble with ON ERROR jumps, so I 
  20. included a function called EXIST to check for files  
  21.  
  22.                      IF EXIST (FileName$) THEN ...
  23.  
  24. It's a useful little extension.
  25.  
  26. So here it is -- the New Improved Version!
  27.  
  28. 
  29.  
  30.