! DLL2.F90 Copyright(c) 1994 - 1998, Lahey Computer Systems, Inc. ! Copying for sale requires permission from Lahey Computers Systems. ! Otherwise, distribution of all or part of this file is permitted ! if these four lines are included. ! ! DLL2.F90, This DLL is for use with the MAIN2 example. ! Please refer to the MK2_FF.BAT and MK2_CF.BAT files for ! instructions for building this example ! ! This example demonstrates tricky interfaces between ! DLL and MAIN, using COMPLEX and CHARACTER data types ! This DLL works with both an LF95 MAIN and a C MAIN. INTEGER FUNCTION dll2(cx1, cx2, dcx1, dcx2, ch1, ch2) DLL_EXPORT DLL2 ! make this available through the DLL interface COMPLEX cx1, cx2(10) COMPLEX*16 dcx1, dcx2(10) CHARACTER*8 ch1*5, ch2(10) cx1 = (1.23,3.21) dcx1 = (3.23,1.21) ch1 = "abcde" DO ido = 1, 10 cx2(ido) = CMPLX(6.78+ido,9.87+ido) dcx2(ido) = CMPLX(67.89d0+ido,98.76d0+ido, 8) DO jdo = 1, 8 ch2(ido)(jdo:jdo) = CHAR(ICHAR('k') + jdo + ido) ENDDO ENDDO dll2 = 9999 RETURN END