home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / qb / basconv.lzh / BAS2QB.DOC next >
Encoding:
Text File  |  1987-04-25  |  2.2 KB  |  56 lines

  1. BAS2QB - V1.1 (4/87)
  2. A QuickBASIC Programmer's Utility
  3. Copyright 1987 By Joe Frankiewicz
  4.  
  5. This program is SHAREWARE. That means if you use it, you should
  6. send in a donation. You'll feel better if you do. (Really).
  7. That also means that you musn't charge a fee for this program.
  8. (And please don't make any alterations to the program or Doc's.)
  9.  
  10. BAS2QB converts a normal BASIC program (saved as an ASCII file)
  11. to a QuickBASIC-type file with unnecessary line numbers removed
  12. and all other line numbers converted to labels. All references
  13. to those line numbers are also changed to labels. The label
  14. consists of the letter 'L' followed by the line number itself.
  15. BAS2QB also makes sure that 'THEN' or 'ELSE' statements followed
  16. by line numbers are changed to 'THEN GOTO' or 'ELSE GOTO'as
  17. required by QuickBASIC.
  18.  
  19. To start the program, type 'BAS2QB' and press [RETURN].
  20.  
  21. When prompted for the INPUT Filename, enter the source file's
  22. drive\path\filename[.ext]. If you do not supply an extension,
  23. .BAS is used by default.  The source file must be a standard
  24. BASIC  program  that  has  been  saved  in  ASCII
  25. format (SAVE'programname',A).
  26.  
  27. When prompted for the OUTPUT Filename, enter the destination
  28. file's drive\path\filename[.ext]  or just press [RETURN] to
  29. use the default filename (shown in brackets). If you enter a
  30. filename but not an extension, .QBS is used by default.
  31.  
  32. The source file will be read in the first pass in order to build
  33. a table of line numbers that are referenced by branching
  34. statements. The following statements are cross-referenced:
  35.  
  36.  GOSUB  RETURN  GOTO  THEN  ELSE  RESTORE  RESUME  RUN
  37.  
  38. In the second pass, the file is re-written, eliminating any
  39. line numbers that are not referenced, and changing those that
  40. are referenced into labels. Each line is then searched for
  41. line numbers and if any are found, they are changed to labels
  42. also. If a 'THEN linenumber' or 'ELSE linenumber'statement
  43. is found, it is converted to 'THEN GOTO linenumber' or 'ELSE
  44. GOTO linenumber' as required by the QuickBASIC compiler.
  45.  
  46. This program was written in QuickBASIC 2.01.
  47.  
  48. Send donations, bug reports, and suggestions to:
  49.  
  50.      Joe Frankiewicz
  51.      1527 Norway #2B
  52.      Palatine, IL 60074
  53.  
  54. Thanks!
  55.  
  56.