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

Compiler option for initializing variables

Shayesteh_M_
Beginner
988 Views

I'd like to know whether there is a way to initialize all the variables in a FORTRAN code to zero during compilation?

Thanks.

0 Kudos
1 Solution
mecej4
Honored Contributor III
988 Views

The /Qzero option will do this, but only for scalar local variable that have been given the SAVE attribute. Read about this option and the related /Qsave option in the compiler reference manual.

View solution in original post

0 Kudos
2 Replies
mecej4
Honored Contributor III
989 Views

The /Qzero option will do this, but only for scalar local variable that have been given the SAVE attribute. Read about this option and the related /Qsave option in the compiler reference manual.

0 Kudos
Shayesteh_M_
Beginner
988 Views

Thank you very much for your quick reply. My problem was solved.

0 Kudos
Reply