Fortran scalar pointer

Hello

The following doesn’t seem to work i.e. I see a compilation error:

Integer, Pointer, Device :: pI => Null()

In this case, the intended usage is pI => someIntegerVariable.

Thus, is it that the pointers on the device must be arrays? Or I am missing some additional syntax?

Abhijit

Hi Abhijit,

What error are you seeing? Can you please provide a minimal reproducing example?

Setting the device pointer to null should be fine given null is a pointer type, but don’t believe setting a pointer to a random integer (i.e. not a pointer type) is valid Fortran. Though, having an example will help me understand what you’re wanting to do.

-Mat