Basic 7.1 "Internal Error Near 851C", DEFINT and DEF FN (83464)



The information in this article applies to:

  • Microsoft Basic Professional Development System for MS-DOS 7.1

This article was previously published under Q83464

SYMPTOMS

The following Basic code, when compiled, will give an "Internal Error Near 851C":
   DEFINT A - Z
   DEF FNFUNCT (X) = X * X
				

STATUS

Microsoft has confirmed this to be a bug with Microsoft Basic Professional Development System (PDS) for MS-DOS, version 7.1. This problem was corrected in Microsoft Visual Basic version 1.0 for MS-DOS.

MORE INFORMATION

Steps to Reproduce Problem

  1. Use the DEFINT A-Z statement (other DEFs will not cause the error).
  2. Pass at least one parameter into the function. It must be an integer.
  3. In the function, multiply the parameter by itself.
  4. Compile the code. None of the option settings prevent the error.
  5. The error "Internal Error Near 851C" will occur on the DEF FN line.
NOTE: This error does not occur in the QBX.EXE environment. The problem only occurs under Basic PDS version 7.1.

To work around this problem, do not use the DEFINT function, or change the data type of the parameter used in the function as follows:
   DEF FNFUNCT (X&) = X& * X&
				

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB83464