(j3.2006) Question about IEEE assignment and derived types

Dick Hendrickson dick.hendrickson
Fri Dec 14 11:53:04 EST 2007


This is a multi-part question and everything depends on the
answer to the first question.  If that is NO, then everything
that follows isn't interesting.

1)  It's my understanding that IEEE conformance requires raising
an exception whenever a NaN is used (assuming that the correct
IEEE modules are used and that enough IEEE_SET routines have
been called).  If so, does this mean that
        A = B
must raise an exception if B is a NaN?

If NO, hit the delete key now!

2)  Then obviously
        C%E = D%E
must raise an exception if C and D are of a type that has a real
component and D%E is a NaN.

3)  Again, then obviously
        C = D
must raise an exception if intrinsic assignment is used and
D%E is still a NaN

4)  How about if defined assignment is used?  The defined
assignment section (12.4.3.4.3) says C=D is equivalent to
      CALL USER_SUB (C, (D))
12.5.4 says that the argument expression, (D), is evaluated.
Does that mean that an exception must be raised on the calling
side?  Can't be raised, or is it processor dependent?
Can the expression be evaluated without using the value of
its elements?

5)  How about allocation with a source = term.
     ALLOCATE (C, SOURCE = D)
6.6.1.2 says the value of C "becomes" that of D.  Again,
should an exception be raised if D%E is a NaN?

Dick Hendrickson



More information about the J3 mailing list