| Title: | Digital Fortran |
| Notice: | Read notes 1.* for important information |
| Moderator: | QUARK::LIONEL |
| Created: | Thu Jun 01 1995 |
| Last Modified: | Fri Jun 06 1997 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 1333 |
| Total number of notes: | 6734 |
Yet another question re: Visual Fortran. A customer would like to know if Visual Fortran has a compiler or linker feature (perhaps a command parameter?) that will guarantee that any data that is not explicitly initialized within the program will be initialized to binary zeroes. Thanks, Dave
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 1233.1 | No guarantee | TLE::EKLUND | Always smiling on the inside! | Wed Mar 19 1997 15:22 | 16 |
The general answer is no. This is especially true for
subroutines which may be recursive (using a stack for local
variables - these do NOT get automatically set to zero).
If the data is static (blank COMMON) and global, it will
usually be zero initially, but we do NOT guarantee this,
nor does the Fortran Standard. If you want something to
be zero, put it in a DATA statement, or arrange to (re)initialize
it at the correct times. If you do not do this, there is NO
guarantee what the values might be. Will they usually be
zero? Yes, most likely. Do we ever guarantee it? No.
Might it change? Yes, what may be zero now just might change
in the future, or vice versa.
Cheers!
Dave Eklund
| |||||