CCL: G95 compiler issue
- From: Toomas Tamm <tt-ccl2_+_yki.ttu.ee>
- Subject: CCL: G95 compiler issue
- Date: Thu, 11 Nov 2010 16:03:21 +0200
Sent to CCL by: Toomas Tamm [tt-ccl2],[yki.ttu.ee]
Hello John,
> Sent to CCL by: John McKelvey [jmmckel^^^gmail.com]
> I am trying to compile a code which the second routine is called with
> an argument such as 'second(integer)'.. At *compile* timeG95
> complains that this is not standard..
Unlike C and many other languages, where you can redefine, eg sin(x) to
return whatever value you please, Fortran has the notion of intrinsic
functions: sin(x) always returns the sine of the argument and the
compiler with complain if you try to provide your own implementation of
function sin(x).
Thus the question comes down to whether second(i) is defined as
intrinsic in Fortran 95 standard. If it is, your program violates the
standard and a different name for the function should be chosen. If it
is not, there may be other solutions, up to filing a bug report against
the compiler.
--
Toomas Tamm e-mail: tt-ccl2 (at) kky . ttu . ee
Chair of Inorganic Chemistry voice: INT+372-620-2810
Tallinn University of Technology fax: INT+372-620-2828
Ehitajate tee 5, EE-19086 Tallinn, Estonia http://www.kk.ttu.ee/toomas/