[Dart-dev] [4549] DART/trunk/obs_kind/DEFAULT_obs_kind_mod.F90: Separate the access of the optional argument to a new line.
nancy at ucar.edu
nancy at ucar.edu
Mon Nov 15 16:25:35 MST 2010
Revision: 4549
Author: nancy
Date: 2010-11-15 16:25:34 -0700 (Mon, 15 Nov 2010)
Log Message:
-----------
Separate the access of the optional argument to a new line.
It is legal for fortran compilers to evalute both parts of
a compound if statement and in this case if 'restrict' is
.false. 'use_list' isn't present and can cause core dumps.
Not an error for any of the dart-supplied programs because
they all pass in the optional argument, but will be wrong
if a user writes their own code and doesn't specify arg 3.
Modified Paths:
--------------
DART/trunk/obs_kind/DEFAULT_obs_kind_mod.F90
-------------- next part --------------
Modified: DART/trunk/obs_kind/DEFAULT_obs_kind_mod.F90
===================================================================
--- DART/trunk/obs_kind/DEFAULT_obs_kind_mod.F90 2010-11-12 22:48:53 UTC (rev 4548)
+++ DART/trunk/obs_kind/DEFAULT_obs_kind_mod.F90 2010-11-15 23:25:34 UTC (rev 4549)
@@ -726,7 +726,9 @@
endif
do i = 1, max_obs_specific
- if (restrict .and. use_list(i) == 0) cycle
+ if (restrict) then
+ if (use_list(i) == 0) cycle
+ endif
if (is_ascii) then
write(ifile, *) obs_type_info(i)%index, obs_type_info(i)%name
More information about the Dart-dev
mailing list