I am trying to use a type in another type. However, I just cannot make it compile. It is strange to me: the select type thing works in the main program but it doesn\'t work in a
No reason to use a pointer, just use the association part of select type (you did not write the error message, but IIRC it is quite descriptive):
select type
select type (twf => this%WF)