QuickBASIC Language Programs
All of the QuickBASIC Language example programs in this chapter are
written for the 82335 GPIB Interface Card using the GPIB Command
Library for BASIC.
Running a QuickBASIC Program
To run a program, first compile and link the program to make an
executable file. You can either compile and link the program in the
QuickBASIC environment, or compile and link separately from the
DOS
command line.
To compile and link a program in the QuickBASIC environment,
execute the following:
qb <
path... \program.BAS> /l <path... \qbhpib>
This loads both the program and the
GPIB library into the
QuickBASIC environment. Note that this only selects the
environment for QuickBASIC versions 4.0 and above only.
To compile and link a program from the DOS command line is a
two-step method as follows:
First, compile the program by executing the following:
bc <
path... \program.BAS>
This generates an object listing that has the same name as the
program name with an “.OBJ” extension. The object file must be
linked to the
GPIB library.
Second, link the GPIB library:
link <
path... \program.BAS>
After prompted for a run file, press the Enter key. This generates
the executable file with an “.EXE” extension.
6
Chapter 6 Application Programs
QuickBASIC Language Programs
247