(j3.2006) Question about DIM
Bill Long
longb
Thu Jan 14 08:42:20 EST 2016
On Jan 13, 2016, at 11:50 PM, Cohen Malcolm <malcolm at nag-j.co.jp> wrote:
>> Without the internal checks, there is little point to DIM.
>
> DIM does not have any internal checks, and none are possible when the result
> is out of range. You are arguing that the standard should mandate one
> particular wrong answer; this is *NOT* an improvement on the current
> situation, indeed it is a disimprovement since the error is detectable at
> runtime.
The whole point here is that the error is NOT detectable at runtime (for the integer case) except by including checks in the code, either explicitly by the user or internal to the code computing DIM. I don?t understand why no checks are possible inside DIM if X-Y is out of range. If X-Y is out of range, DIM can return any value it chooses since, on good authority, the program is nonconforming. Returning zero, or a negative result, seems reasonable in that case.
Cheers,
Bill
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101
More information about the J3
mailing list