! MAIN3.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. ! ! MAIN3.F90, This is a main program unit for use with the ! DLL3a and DLL3b DLLs. Please refer to the MK2_FF.BAT ! file for instruction on building this example. ! ! This example demonstrates tricky interfaces between ! nested DLL and MAIN, using a derived type data type PROGRAM main USE mod TYPE(foo_t)::f1, f2(10), f3 POINTER f3 LOGICAL l,COMPARE, COMPARE2 INTEGER FILL, FILL2 DLL_IMPORT FILL, COMPARE, COMPARE2, FILL2 OPEN(10, "temp") WRITE(10,*)"should print 3 1s and 3 TRUEs" i = FILL(f1) WRITE(10,*)i i = FILL2(f2) WRITE(10,*)i ALLOCATE(f3) i = FILL(f3) WRITE(10,*)i l = COMPARE(f1) WRITE(10,*)l l = COMPARE2(f2) WRITE(10,*)l l = COMPARE(f3) WRITE(10,*)l STOP "Passed" ! when we get this far, everything works END