[J3] Should all intrinsic functions be simple?

Malcolm Cohen malcolm at nag-j.co.jp
Wed Dec 20 08:52:50 UTC 2023


> Does the standard say anywhere that these two parameters, declared back to back, must have the same value?

It says what the value is. And that it is constant. Surely that is enough.

> True, one could imagine a compiler implementing those procedures as having a hard-coded result determined at compilation time.

Yep! Required! (Constant expressions can be used to determine things like kind type parameters.)

> The IEEE_GET/SET_* subroutines are explicitly stated to be simple.

Arithmetic can also set the flags. By this argument, floating-point arithmetic would be forbidden in simple procedures.

Cheers,
-- 
..............Malcolm Cohen, NAG Oxford/Tokyo.





More information about the J3 mailing list