Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Default value of dimensions

Nima_Khorsandnia
Beginner
790 Views
Hi Steve,
I have upgraded my previous code to new intel fortran and is working properly but I have an issue. The default value of integer dimensions is-842150451 and real numbers is-6.277438562204192E+066, which are the lowest bound. In older versions, the default value was zero. Is there any way that I can make all my dimensions zero or I should do it one by one in the code?
Looking forward to hearing from you soon.
Warmest regards,
Nima
0 Kudos
2 Replies
Les_Neilson
Valued Contributor II
790 Views
If I understand correctly you mean scalar variables (not "dimensions") and you have code which relied upon those variables being automatically initialised to zero.

I highly reccommend that youchange your code to explicity initialiseyour variables to zero (or some other relevant value), so that it is then obvious to a future reader of the code (which may be yourself) what is happening.

But there us a compiler setting /Qzero to initialise local scalars (NOT ARRAYS).

This is non-standard and non-portable and should not be relied upon.

Les
0 Kudos
TimP
Honored Contributor III
790 Views
Programs which rely on /Qzero often also rely on /Qsave and on avoiding certain modern syntax and compiler optimization features. Those options may help as temporary stop-gaps while correcting other errors.
0 Kudos
Reply