Got a wierd situation. I have a routine (QW_SetAdr defined in a separate DLL) that displays a value on the screen. When it is passed a variable defined through a pointer to a structure variable, it behaves inconsistently. So, to give a coding example:
In the following, CPH is defined in a module and populated elsewhere
TYPE(PHRES), POINTER :: PH
.
.
PH=>CPH
.
.
CALL QW_SetADR (IS, IFLD, PH%Avalue)
Fails to update the field on the screen cleanly.
But…
TYPE(PHRES), POINTER :: PH
.
.
PH=>CPH
.
.
AVALUE = PH%Avalue
CALL QW_SetADR (IS, IFLD, Avalue)
…Works
And…
TYPE(PHRES) :: PH
.
.
PH=CPH
.
.
CALL QW_SetADR (IS, IFLD, PH%Avalue)
…Works as well
If I try stepping through the code under /debug, it all works OK, but if I just run the app, regardless of whether the relevant code is compiled under /debug or not, sometimes it works, sometimes it doesn't.
Any ideas?
TIA
K