- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using real*8 and complex*16 to declare some variables, and the Locals window gives REAL(8) and COMPLEX(8) for their respective data types. I was expecting COMPLEX(16). Numerical values for my real*8 variables use D for the exponential as I would expect, but my complex*16 variables are using E.
Am I doing something wrong? My program is crashing with an error message that suggests the data types I'm passing in are not the data types I'm expecting them to be. Run-Time Check Failure #2 - Stack around the variable '.T2_' was corrupted.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The COMPLEX*16 extension corresponds to the standard syntax of COMPLEX(8). See https://software.intel.com/en-us/node/526047 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply. It makes sense to me now. I was thrown off by the use of E instead of D for the complex*16 variables. It appears that the Visual Studio debugger uses E for all complex variables, even for complex*32.
I've got work to do to find the error causing the crashes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think I found and fixed the source of the crashing. So I'm a happy camper. :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use of D in output formats is not current practice in Fortran. You'll note that the D format item has not been extended the way E has to allow specifying number of exponent digits, for example. E is preferred for all real/complex kinds.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page