PRB: Compilation Errors--$FREEFORM & Graphics Subroutine Calls

ID: Q50595


The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, versions 5.0, 5.1
  • Microsoft FORTRAN for OS/2, versions 5.0, 5.1


SYMPTOMS

An attempt to compile an application that uses the $FREEFORM metacommand and calls the FORTRAN graphics run-time library fails.


CAUSE

The FGRAPH.FD and FGRAPH.FI files do not conform to the $FREEFORM format.


RESOLUTION

If you must use the $FREEFORM metacommand, you must modify the FGRAPH.FD and FGRAPH.FI files. We recommend that you create customized include files that contain only the information that pertains to the graphics routines your application calls.


MORE INFORMATION

The following code example uses the $FREEFORM metacommand and calls a subroutine in the FORTRAN graphics library.

Sample Code


C Compile options needed: None

      $FREEFORM
      include 'OHMAN.FI'
      subroutine mysub()
      include 'OHMAN.FD'
      call setlinestyle(#AA3C)
      end 
For this particular example, the OHMAN.FI file contains the subset of FGRAPH.FI that pertains to the setlinestyle subroutine. OHMAN.FI is as follows:

INTERFACE TO SUBROUTINE setlinestyle[FAR,C,ALIAS:"__setlinestyle"] (mask)
INTEGER*2 mask
END 
Likewise, the OHMAN.FD file contains the subset of FGRAPH.FD that pertains to the setlinestyle subroutine. OHMAN.FD is as follows:

      EXTERNAL setlinestyle 

Additional query words: 5.00 nofps 5.10

Keywords :
Version : :5.0,5.1
Platform :
Issue type :


Last Reviewed: November 3, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.