The following code should, when a ENTER is done, return the value 400 as the value from the closure of the window. It does not. Clicking the button will, however.
This function works as it should if the button is NOT in the child window.
winapp
program main
integer,external:: runx
integer:: ret_val
integer(7):: child
data ret_val/5/
i = winio@('%sh&',child)
i = winio@('%`^bt[Change]%nl&',runx)
i = winio@('%bt[Not Default]')
i = winio@('%ch&',child)
i=winio@('%`rd', ret_val)
print *,i
end
integer function runx()
use mswin
runx = -400
return
end