Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Set variables to zero

alan_wilhite
Beginner
392 Views
Is there a compiler option (or any other option) to initialize all the FORTRAN variables to zero.

I have tried /Qzero but this does not work for me.

I have a very large legacy code that requires this.

Thank you
0 Kudos
2 Replies
TimP
Honored Contributor III
392 Views
Is there a compiler option (or any other option) to initialize all the FORTRAN variables to zero.

I have tried /Qzero but this does not work for me.

I have a very large legacy code that requires this.

Thank you
/Qsave /Qzero may have a better chance. This is incompatible with /Qopenmp , /Qparallel, or recursion.
0 Kudos
Wendy_Doerner__Intel
Valued Contributor I
392 Views

/Qzero works for onlylocal variables. If you need to find occurences where variables are unitialized you can use the /check:uninit option to add runtime checks.

------

Wendy

Attaching or including files in a post




0 Kudos
Reply