Technical data

Fortran/C Interface
37
If the same common block is of unequal length, the largest size is used
to allocate space.
Unnamed common blocks are given the name _BLNK_
.
The following examples show C and Fortran routines that access common
blocks of data.
Fortran
subroutine sam()
common /r/ i, r
i = 786
r = 3.2
return
end
C
struct S {int i; float j;}r_;
main () {
sam_() ;
printf(%d %f\n,r_.i,r_.j);
}
The C routine prints out 786 and 3.2.