Paul, 'THIS' does not work.
I have thought long and hard about how to use the %ud for a type. One issue is that a pointer has (for everything else other than numbers) a complex 'structure' underneath to support. That being said, the first element in a pointer is always the actual pointer value. But there is not easy way to set that pointer value. I have tried everything other than one of the core() functions to get the pointer value set easily (except as listed at the end of this message). Perhaps a special non-transportable function to set the value of the internal pointer (pcore()?).
So, for an arbitrary TYPE (ABCD):: QRST, loc(QRST) gives the address of the TYPE that can go into the %ud. In the receiving module, the syntax would be
TYPE(ABCD),pointer::DEFG
pcore(DEFG) = clearwin_info@('USER_DATA')
]
so you can get the elements of DEFG using standard FORTRAN syntax and rules.
As an experiment, I did some code/edoc testing and that worked to get a value set for a pointer within a TYPE as I have described. It is a non-trivial method. That said, there is no 'standard' way that I can see to 'simulate' the equivalent of an ALLOCATE. But, maybe there is!
In a section of my own code, I use a COMMON declaration to do this. It works, but the disadvantage is that you can't just use an INCLUDE to get the declarations performed. So it has very limited use. Should anyone wish to see how it works, I can post a separate set of code segments. The basic technique is to declare an intrinsic data type in the 'driver' COMMON, and the 'receiver' defines this common as containing the pointer to the data type.