"Argument Count Mismatch" If CALL ABSOLUTE DECLARE Not Changed

Article translations Article translations
Article ID: 51077
This article was previously published under Q51077
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

SUMMARY

When using CALL ABSOLUTE in a Microsoft Basic program, the error message "Argument Count Mismatch" occurs if parameters are passed to the CALLed routine and the DECLARE for CALL ABSOLUTE in QB.BI is not changed.

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 to Microsoft Basic PDS Version 7.00 for MS-DOS.

MORE INFORMATION

The following lines appear in the include file QB.BI shipped with QuickBasic Versions 4.00, 4.00b, and 4.50 and Microsoft Basic Compiler Versions 6.00 and 6.00b, and in QBX.BI shipped with Microsoft Basic PDS Version 7.00:
   'Call a routine at an absolute address.
   'NOTE: If the routine called takes parameters, then they will have to
   '      be added to this declare statement before the parameter given.
   DECLARE SUB ABSOLUTE (address AS INTEGER)
				
This DECLARE statement must be changed if any parameters are passed to the CALLed routine. For example, if the CALLed routine was passed two parameters as follows
   CALL ABSOLUTE(FirstNumber!, SecondNumber%, VARPTR(AsmProg(1)))
				
then the DECLARE statement in QB.BI or QBX.BI should be changed to the following:
   DECLARE SUB ABSOLUTE(A AS SINGLE, B AS INTEGER, address AS INTEGER)
				

Properties

Article ID: 51077 - Last Review: February 27, 2014 - Revision: 1.2
Keywords: 
kbnosurvey kbarchive KB51077

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com