On 2016-05-12 06:34-0000 Arjen Markus wrote:

[...]
> My intention is to add IMPLICIT NONE anywhere where this is required:
>
> - At the beginning of a module, but not in the contained routines, as they 
> inherit that feature (the module provides the scope)
>
> - At the beginning of a subroutine or function statement inside an interface 
> block, as the interface defines a new scope. These new scopes also make it 
> necessary to import any names used inside the interface. See the problem 
> Wadud reported.
>
> So, all in all, a number of IMPLICIT NONE statements and one or two imports 
> have to be added, but they will not clutter then CONTAINS section.

OK.  Sounds good.

> As for undefined variables: Fortran "standardese" distinguishes
between declarations (affected by IMPLICIT statements) and definitions
(variables having been assigned a value or not). Simply put: An
undefined variable has no reliable value. This can occur in various
contexts, but really is a run-time property. A variable that is not
explicitly declared can be detected at compile-time. Most compilers
have some option to detect that. Detecting undefinedness is much
harder.

Thanks for clearing up that nomenclature.  It appears then, that the
ifort and NAG fortran compiler options I found concerned the wrong
problem (undefined variable).  What we need instead is a check of our
Fortran binding and Fortran examples code for any variable without an
explicit declaration, i.e., the easier problem.  Presumably, if you
put "implicit none" in all the right places, it should detect any such
issues, but finding all those right places strikes me as an
error-prone process so to double-check that I hope you are able to
find and use a compiler option to check for variables that are not
explicitly declared for either the ifort or NAG Fortran compilers.  As
far as I can tell, gfortran does not have such an option.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to