Must DECLARE a FUNCTION Invoked from an External Library (43252)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
This article was previously published under Q43252 SUMMARY
To use a FUNCTION that is in a library (.LIB) or Quick Library (.QLB),
you must have a DECLARE statement at the top of each module that uses
the FUNCTION. This is documented in the "Microsoft QuickBasic 4.0:
Basic Language Reference" manual for Versions 4.00 and 4.00b, Page
139, and the QuickBasic 4.50 on-line QB Advisor by choosing <Help>
<Index> DECLARE Statement (Basic Procedures) <Details> and in the
"Microsoft Basic 7.0: Programmer's Guide" on Page 53.
The documentation states that you must use DECLARE if you invoke a
FUNCTION that is defined in another module. Library files (.LIB and
.QLB) are "other modules," as are SUBprogram or FUNCTION modules
that start from a separate .BAS or MS-DOS file.
This information applies to Microsoft QuickBasic Versions 4.00, 4.00b,
and 4.50 for MS-DOS, to Microsoft Basic Compiler Versions 6.00 and
6.00b for MS-DOS and MS OS/2, and to Microsoft Basic PDS Version 7.00
for MS-DOS and MS OS/2.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB43252 |
---|
|