[J3] Question regarding valid set of values
Thomas König
tk at tkoenig.net
Thu May 20 17:32:29 UTC 2021
Hi,
I have some trouble finding where the standard clearly
forbids something.
Consider the program
integer :: i
i = huge(i)
write (*,*) i + 1
end
This clearly exceeds the range of valid values for i, but I have
trouble finding the spot (or combination of spots) in the standard where
this is prohibited. 7.1.3 only tells me that
# For each type, there is a set of valid values. [...]
# The sets of valid values for integer, character, and real are
# processor dependent.
huge(i) returns the largest model number (16.9.96), and 16.4 gives the
numeric models which states
# The numeric manipulation and inquiry functions are described in terms
# of a model for the representation and behavior of numbers on a
# processor.
but that also does not appear to make this illegal. Clause 10 is
mostly about syntax.
So, did I miss anything which makes the program above illegal? Or can
this be inferred some other way?
Best regards
Thomas
More information about the J3
mailing list