! F95callC.f90 ! Copyright 1998 Lahey Computer Systems, Inc. ! ml_external GenTable integer gentable,totalf real totalc common /mycommon/ totalc, totalf integer start, end, table_lines write(*,1) 'Where should the table start (enter an & &integer less than 10) ? ' read(*,*) start write(*,1) 'In Fortran, now calling C' table_lines=gentable(start, end) write(*,1) 'Back in Fortran, after calling C' write(*,2) 'The table ended at:',end write(*,3) 'Total degrees c=',totalc write(*,2) 'Total degrees f=',totalf write(*,2) 'Number of lines in table:',table_lines 1 format(1x,a) 2 format(1x,a,i7) 3 format(1x,a,f10.2) end block data setmycommon common /mycommon/ totalc, totalf data totalc/0.0/, totalf/0.0/ end block data setmycommon