ML_EXTERNAL Statement
LF Fortran 95

ML_EXTERNAL Statement

Description

The ML_EXTERNAL statement makes a procedure externally available to a statically linked mixed-language calling routine.


Syntax

ML_EXTERNAL [::] ml-external-names

Where:

ml-external-names is a list of procedures defined in the current scoping unit.

Remarks

The procedures in ml-external-names must not be module procedures.

The procedure names listed in an ML_EXTERNAL statement are "decorated" to match one of several calling conventions by using the "-ml x.xx" switch at compile time.

Example

function half(x) integer :: half,x ml_external half ! ml_external statement half=x/2 end function half function twice(x) integer,ml_external :: twice ! ml_external attribute twice=x*2 end function twice