LF Fortran 95


Protect Constant Arguments

Compile only. Default: -npca

Specify -pca to prevent invoked subprograms from storing into constants. The -pca option will silently protect constant arguments and does not produce any warnings.

If -chk (a) is specified in conjunction with -pca, the action of -chk (a) is overridden by the action of -pca In this case, no error is generated when a dummy argument that is associated with a constant actual argument is assigned a new value in the subprogram.


call sub(5) print *, 5 end subroutine sub(i) i = i + 1 end

This example would print 5 using -pca and 6 using -npca.

Visual Studio Property

The -pca option corresponds to the Fortran|Behavior|Protect Constant Arguments property. This property can be set on the property page for the project or source file.

See Also

Setting Build Options