Allow newunit to allocate an integer variable

The print, write, read, allocate, and deallocate statements can take any number of “arguments” of any type, kind, and rank, and Fortran would be much less convenient if those statements did not have such flexibility. I think the closest a procedure can come to this is to have many class(*),intent(in),optional arguments. It would be nice if a non-intrinsic function could have a return type that depends on a kind argument that is known at compile time, as
real(a [, kind]) does. Does the intrinsics proposal allow that?

1 Like