Correction for [NEAR] Example Calling FORTRAN from Basic PDS (72422)



The information in this article applies to:

  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.1

This article was previously published under Q72422

SUMMARY

There is a documentation error in the Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 "Microsoft Basic: Programmer's Guide" on page 435 under the section "Calling FORTRAN from Basic - Subroutine Call."

In the FORTRAN code given, the two integer parameters are declared as:
       INTEGER*2 I NEAR
       INTEGER*2 J NEAR
				
Attempting to compile the FORTRAN code given will result in the warnings "Variable INEAR declared but never used" and "Variable JNEAR declared but never used" from the FORTRAN compiler. Because FORTRAN allows spaces in variable names, the compiler is parsing the incorrect code as two declarations for the variables INEAR and JNEAR.

To correct the error, place brackets around the "NEAR" keyword in both declarations, so that they read as follows:
       INTEGER*2 I [NEAR]
       INTEGER*2 J [NEAR]
				
This information applies to Microsoft Basic Professional Development System versions 7.00 and 7.10 for MS-DOS and MS OS/2.

Modification Type:MajorLast Reviewed:10/20/2003
Keywords:KB72422