Quoted from John-Silver
...
Does that mean that, following the example given above of MODule usage and calling, one could utilise a routine written in C, or indeed for that matter a routine written in F77, with the main bulk written in FTN95, and if so what interface (of variables, etc...) issues are there likely to be ?
Yes. Furthermore, whether you are aware of it or not, you are already doing this every time that you use FTN95 to build one of your programs. The Salford runtime, SALFLIBC.DLL, was probably written in C or a mix of C and Fortran. To use it, however, you do not need to know the details as long as you adhere to the calling convention.
If you are prepared to knock together bits of glue code in C, you can even use libraries from other vendors. For example, you can use the routine vsErf from the Intel MKL library ( https://software.intel.com/en-us/node/521811 ) as follows:
extern void vsErf(int n, float *a, float *y);
void ERF(int *n,float *a, float *y){
vsErf(*n, a, y);
}
Once you compile this C code into a DLL, you can call ERF() in your FTN95 source code and link to the DLL.
program xerf
implicit none
integer n
real a(4),x(4)
n=4
a = (/1.0, 1.5, 2.0, 2.5/)
call erf(n,a,x)
write(*,'(4F10.5)')x
end