! MAIN1.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. ! ! MAIN1.F90, This is a main program unit for use with the ! DLL1 DLL. Please refer to the MK1_50.BAT and MK1_05.BAT ! files for instruction on building this example ! ! This example demonstrates 'simple' interfaces between ! DLL and MAIN, using intrinsic data types PROGRAM main DLL_IMPORT DLL1 REAL a, a1(10) INTEGER i, i1(10), result, dll1 LOGICAL l, l1(10) result = dll1(a, a1, i, i1, l, l1) IF(result /= 9999) STOP "failed result" IF(ABS(a - 1.23) > .1) STOP "failed a" IF(i /= 9876) STOP "failed i" DO ido = 1, 10 IF(ABS(a1(ido) - (ido * 2 - 1)) > .1) STOP "failed a1" IF(i1(ido) /= (ido * 2)) STOP "failed i1" ENDDO STOP "Passed Example 1" ! when we get this far everything is working END PROGRAM main