If DECLARE AS ANY, then Caution Since BC.EXE Won't Type-Check (78956)
The information in this article applies to:
- Microsoft Basic Professional Development System for MS-DOS 7.0
- Microsoft Basic Professional Development System for MS-DOS 7.1
- Microsoft QuickBASIC 4.5, when used with:
- the operating system: MS-DOS
This article was previously published under Q78956 SUMMARY
The ANY keyword is an optional type that can be used in the "AS
{type}" clause of the Basic DECLARE statement. While the AS ANY type
will work for Basic routines, it is intended only for use when you
DECLARE external procedures written in other (non-Basic) Microsoft
languages.
If a parameter uses the AS ANY clause in a DECLARE statement for a
Basic SUB or FUNCTION procedure, the program will operate normally in
the QB.EXE or QBX.EXE environment in most cases. However, when the
program is compiled with BC.EXE, BC.EXE cannot type-check parameters
passed with the AS ANY clause. This may result in unexpected (zero,
incorrect, or possibly hanging) parameter values if you pass parameter
types that incorrectly match the types expected by the SUB or
FUNCTION.
This information applies to Microsoft Basic Professional Development
System (PDS) versions 7.0 and 7.1 for MS-DOS and MS OS/2, and to
Microsoft QuickBasic version 4.5 for MS-DOS.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB78956 |
---|
|