silverdan
Joined: 14 May 2009 Posts: 29
|
Posted: Wed Mar 10, 2010 5:25 pm Post subject: Statement ordering error - FUNCTION cannot appear after type |
|
|
If I have the STDCALL statement below the FUNCTION I do not get the error, but if the STDCALL is above I get the following error message:
Statement ordering error - FUNCTION cannot appear after type definition statements C:\Perforce\Mv-90\Main\FORT\CommonShared\CommonShared\ITRV.F90 5
Code: |
!!Interface to use Pervasive's DLL BTRCALL routine contained in WBTRV32.DLL
STDCALL BTRCALL '_BTRCALL@28' (VAL,REF,REF,REF,REF,VAL,VAL):INTEGER*4
!***********************************************************************
FUNCTION Itrv(operation,posblock,databuffer,datalength,keybuffer,keynumber)
IMPLICIT NONE
!Make it public
ASSEMBLY_INTERFACE (name="Itrv")
! B_OPEN...
INTEGER*4, INTENT(IN OUT) :: operation
! RTE_FCB
CHARACTER (LEN=128), INTENT(IN) :: posblock
! RTE_BUF
CHARACTER (LEN=*), INTENT(IN) :: databuffer
! RTE_LEN
INTEGER*4, INTENT(IN) :: datalength
! RTE_KEY0
CHARACTER (LEN=*), INTENT(IN) :: keybuffer
! KEY0
INTEGER*4, INTENT(IN OUT) :: keynumber
! max_key_size
INTEGER*4 keylength
INTEGER*4 btrcall,status,itrv
keylength=255
status=btrcall(operation,posblock,databuffer,datalength,keybuffer,keylength,keynumber)
itrv=status
RETURN
END FUNCTION Itrv
!Interface to use Pervasive's DLL BTRCALL routine contained in WBTRV32.DLL
!STDCALL BTRCALL '_BTRCALL@28' (VAL,REF,REF,REF,REF,VAL,VAL):INTEGER*4
|
I would prefer the STDCALL at the beginning of the file if possible. Any suggestions? |
|