[comp.unix.aix] Setting uninitialized values to NaN in a Fortran program

bowman@uiatma.atmos.uiuc.edu (Kenneth P. Bowman) (04/17/91)

I have an ugly Fortran code that I am porting to my 6000/320.  I would like
to set all data values not initialized in data statements to NaN in the
hope of generating error messages if uninitialized variables are used.  At
present, variables are apparently initialized to zero by the loader.  I
have searched the xlf and ld commands for an option to set uninitialized
variables to NaN, but have been unable to find anything.  Anyone out there
have any sugestions?

---------------------------------------------------------------------------
Dr. Kenneth P. Bowman, Assistant Professor     bowman@uiatma.atmos.uiuc.edu
University of Illinois at Urbana-Champaign     bowman@uiucvmd.bitnet
Department of Atmospheric Sciences             217-333-7105
105 S. Gregory Avenue                          217-244-4393 fax
Urbana, IL   61801

freese@dalvm41b.vnet.ibm.com ("Bradley T. Freese") (05/15/91)

bowman@uiatma.atmos.uiuc.edu (Kenneth P. Bowman) writes:

> I have an ugly Fortran code that I am porting to my 6000/320.  I would like
> to set all data values not initialized in data statements to NaN in the
> hope of generating error messages if uninitialized variables are used.  At
> present, variables are apparently initialized to zero by the loader.  I
> have searched the xlf and ld commands for an option to set uninitialized
> variables to NaN, but have been unable to find anything.  Anyone out there
> have any sugestions?

No, there is no method to tell AIX to initialize your data segments to
NaN.