"Argument Count Mismatch" If CALL ABSOLUTE DECLARE Not Changed

This article was previously published under Q51077
This article has been archived. It is offered "as is" and will no longer be updated.
SUMMARY
When using CALL ABSOLUTE in a Microsoft Basic program, the errormessage "Argument Count Mismatch" occurs if parameters are passed tothe CALLed routine and the DECLARE for CALL ABSOLUTE in QB.BI is notchanged.

This information applies to Microsoft QuickBasic Versions 4.00, 4.00b,and 4.50 for MS-DOS, to Microsoft Basic Compiler Versions 6.00 and6.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 withQuickBasic Versions 4.00, 4.00b, and 4.50 and Microsoft Basic CompilerVersions 6.00 and 6.00b, and in QBX.BI shipped with Microsoft BasicPDS 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 tothe CALLed routine. For example, if the CALLed routine was passed twoparameters as follows
   CALL ABSOLUTE(FirstNumber!, SecondNumber%, VARPTR(AsmProg(1)))				
then the DECLARE statement in QB.BI or QBX.BI should be changed to thefollowing:
   DECLARE SUB ABSOLUTE(A AS SINGLE, B AS INTEGER, address AS INTEGER)				
QuickBas BasicCom
Properties

Article ID: 51077 - Last Review: 02/27/2014 18:29:39 - Revision: 1.2

  • kbnosurvey kbarchive KB51077
Feedback