Contrary to the FTN95 documentation, I found that neither of the parameters for BTEST can be dimensional. The same rules apply for gFortran. As such I have always been okay with the function. The confusion was when I substituted BTEST for TEST_BIT@ when this was using an aray, in order to get bit testing working in the gFortran compiler.
As for TEST_BIT@ I cannot see an equivalent in gFortran. I guess this is why the compiler issued a syntax error ?
I need to prove the new gFortran compiler - to us - works in 32 bit mode. Is this what the supplied gf.bat produces or does gf.bat compile in 64 bit mode. From your comment about STDCALL, if we want to compile gFortran in 32 bit then I guess we do indeed require the ISO_C_BINDING equivalent of STDCALL ? I have had a look at the supplied .f95 routines and attempted my own. The text here in is a .f95 the compilation of which is okay to mix as a linked project with compiled .for source ?
My attempt at ISO_C_BINDING
!
MODULE PROGRESS
CONTAINS
SUBROUTINE STARTPROGRESS(VAL1, STRING, VAL2, VAL3, VAL4, VAL5, VAL6) BIND(C,NAME='StartProgress')
USE ISO_C_BINDING
CHARACTER (C_CHAR) :: STRING
INTEGER (C_INT) :: VAL1, VAL2, VAL3, VAL4, VAL5, VAL6
END SUBROUTINE STARTPROGRESS
!
SUBROUTINE UPDATEPROGRESS(VAL) BIND(C,NAME='UpdateProgress')
USE ISO_C_BINDING
INTEGER (C_INT) :: VAL
END SUBROUTINE UPDATEPROGRESS
!
SUBROUTINE ENDPROGRESS() BIND(C,NAME='EndProgress')
USE ISO_C_BINDING
END SUBROUTINE ENDPROGRESS
!
ENDMODULE PROGRESS
!
The only example we have in the use of CORE4() is the one I gave before where an array value is being assigned thru the use of CORE4(). So the concern you have is if any of the array values are zero ?
Thanks[/code]