qbasic.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
RUN Statement
  Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
Runs the current program or a specified program.
 
RUN [{linenumber | file$}]
 
    ■ linenumber    The line number in the current program where execution
                    should begin. If no line number is specified, execution
                    begins at the first executable line.
    ■ file$         The name of a Basic source file. QBasic assumes
                    a .BAS extension.
 
    ■ RUN closes all files and clears program memory before loading a
      program. Use the CHAIN statement to run a program without closing
      open files.
 
Example:
    'Assumes the program TEST.BAS is in a \DOS directory.
    RUN "C:\DOS\TEST.BAS"
 
See Also    CHAIN