Different behavior of C and Fortran Code
Andrew Pinski
pinskia@physics.uc.edu
Wed May 24 10:12:00 GMT 2006
On May 24, 2006, at 3:03 AM, Sebastian Hegler wrote:
> Hi!
>
> Attached you'll find 2 source files in C and F90, which essentially
> do the same.
No they don't do the same.
integer :: a=2
is really:
save, integer :: a = 2;
or in C:
static int a = 2;
see: http://www.cs.rpi.edu/~szymansk/OOF90/bugs.html
"Suprise with locally initialized variables".
-- Pinski
More information about the Fortran
mailing list