- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
&MIN_HOURLY_PLUS,MIN_Daily_PLUS,MIN_MONTHLY_PLUS,
&Num_Month,Num_Day,Num_Hour
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel Fortran does tend to put local scalar variables on the stack so they would be less likely to be zero.
-Qzero helps in some cases, not all. Far better is to fix your program so that it is correct and initializes all variables explicitly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
I have different findings.
I compared the Compact Visual Fortran (CVF)and Intel Fortran (IVF) initialization in the debugger. I have both Visual Studio Integrated Development Environments (Visual Developer Studio and Visual Studio .Net 2003) on the same PC and Windows operating system (XP Pro).
I debugged the same code as well in CVF (V.6.6C) as IVF (v.9...28; IA32), where the code used in IVF was code that is converted in thedefault wayfrom CVF to IVF.
I noticed that with CVF uninitialized local real and integervariables are set to 0.00.. or 0 and that character values are set to ' '.
With IVF the real variables can be initialized to anything small, typically 1e-38, or occasionally it can be NaN (Not a Number) and mayresultlateroninto an error.Uninitialized integer variables are set to the largest integer value. Character variables are initialized to ' ' or some random string value.
In addition, the debugger shows that in CVF character, real, and integer variablesthat are used locally are implicitly saved.
The debugger shows that in IVF only character variablesthat are used locally are implicitly saved. However, real and integer variablesthat are used locally areNOT saved (unless explicitly saved).
Giel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is true that locals are not implicitly SAVEd in Intel Fortran. The default is that scalar locals go on the stack.
It is a mistake to rely on accidental initialization. Your application should initialize all variables before use. Use SAVE when your application requires it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page