I have eventually been able to isolate the problem I referred to about a ressignment of an argument by windows_update@. Below is a program that illustrates the problem. The program creates a window with an MDI frame containing an embedded child window (all of that seems to be necessary to reproduce the problem.) An integer, i, is set initially to 1, and is displayed. If the user then clicks on modify a callback function is activated that first changes i to 2, then to 0 (which is an invalid value for the display). As the program stands to be reset to between the fourth and fifth print statements, presumably to a value that is within the limits set by line 46. Note that if line 12 (that sets i to 2) or line 14 are commented out the reassignment no longer occurs, and i is left at 0.
Module m
Public :: f
Integer, Public :: i
!
Contains
!
Function f()
Use clrwin, Only: winio@, window_update@
Integer :: f
!
Print*, 'First ', i
i = 2
Print*, 'Second', i
Call window_update@ (i)
Print*, 'Third ', i
i = 0
Print*, 'Fourth', i
Call window_update@ (i)
Print*, 'Fifth ', i
f = 2
!
Return
End Function f
End Module m
!
!
Winapp
Program p
Use clrwin, Only: winio@
Use m, Only: i, f
!
Integer :: ic_par, ic_con, ih_con, iw
!
i = 1
!
! Open window
iw = winio@('%ca@&', 'Test')
iw = winio@('%mn[Modify]&', f)
! - create MDI frame -
iw = winio@('%pv%fr&', 400, 300)
iw = winio@('%lw', ic_par)
! - create child window -
iw = winio@('%aw&', ic_par)
iw = winio@('%ww[no_frame,no_caption]&')
! - display value -
iw = winio@('%il&', 1, 10)
iw = winio@('%dd%5rd&', 1, i)
iw = winio@('%ff%`30.5cw[]&', 0, ih_con)
iw = winio@('%lw', ic_con)
!
End Program p