c=========================================================== c Demonstration main program, subroutines and functions c to illustrate RECOMMENDED use of common blocks c using 'include' statement. Safe Fortran 77 c extension. c=========================================================== program tcommon1 implicit none c----------------------------------------------------------- c By convention, I use the extension '.inc' for c Fortran source files which are to be included. c----------------------------------------------------------- include 'coma.inc' string = 'foo' v(1) = 1.0d0 v(2) = 2.0d0 v(3) = 3.0d0 x = 10.0d0 y = 20.0d0 z = 30.0d0 i = 314 call subcom() stop end c=========================================================== c This subroutine dumps information passed to it in c a common block. c=========================================================== subroutine subcom() include 'coma.inc' write(0,*) 'In subcom:' write(0,*) 'string = ', string write(0,*) 'v = ', v write(0,*) 'x = ', x, ' y = ', y, ' z = ', z write(0,*) 'i = ', i return end