Some CUDA Fortran API functions are really designed against good programming practice

I programmed C, Fortran, and CUDA C for more than ten years and recently looked
at CUDA Fortran. I have to say that some CUDA Fortran API functions are really
designed against good programming practice, e.g. cudaGetDeviceProperties(prop, idev).
It would be better to use Fortran subroutine, instead of Fortran function,
in these cases.

See Page 79, Michael Metcalf, John Reid, and Malcolm Cohen, Fortran 95/2003
Explained, Oxford University Press, 2005.

5.10 Functions

It is permissible to write functions that change values of their arguments, …
However, these are known as side-effects and conflict with good programming
practice. Where they are needed, a subroutine should be used. …

All CUDA API calls in C are functions which return a status value. We followed the same convention, for obvious reasons.

Thank you for the reply! C function, however, is different from Fortran function, e.g. a C function may be void f(int a), which likes a Fortran subroutine. But a Fortran function must return some value, which is used in an expression. Anyway, this is a personal preference.