KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q27476: Guidelines for Interfacing FORTRAN with Compiled BASIC

Article: Q27476
Product(s): See article
Version(s): 4.00 4.00b 4.50
Operating System(s): MS-DOS
Keyword(s): ENDUSER | B_BasicCom | mspl13_basic
Last Modified: 14-DEC-1988

Interfacing FORTRAN with compiled BASIC is fairly straightforward;
however, there are several rules to observe.

These rules are as follows:

1. FORTRAN should not be linked with the small-memory model.

2. When compiling the FORTRAN subroutine, no special switches need to
   be used. However, you need to LINK the BASIC and FORTRAN routines
   with the /NOE option.

3. FORTRAN has the ability to call BASIC subprograms; however, the
   FORTRAN routine that calls the BASIC subprograms must have
   originally been called by a BASIC main program.

4. All variables that are passed from a FORTRAN routine to a BASIC
   subprogram must be [NEAR] variables.

5. FORTRAN routines can be used in a quick library if so desired.

6. Microsoft FORTRAN Version 4.00 is needed to correctly interface
   with QuickBASIC Version 4.00. Microsoft FORTRAN Version 4.10 is
   needed to correctly interface with QuickBASIC Versions 4.00b and
   4.50 or BASIC Compiler Versions 6.00 and 6.00b programs.

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.