The ClearWin code below behaves differently on two different compilers (ftn95 and gfortran). The ftn95 version works as expected (a new window is created for the initial prints / writes and the MDI child window captures subsequent writes).
Under gfortran, the prints / writes do not go anywhere. I can live without the first few prints creating a window, it is the %cw functionality I am trying to get working in a much larger programme. Unit 6 is stdout, but 120 has been tried as well with the same results on both.
They are both compiled using 64 bit ClearWin.
PROGRAM main
use clrwin$
INTEGER*8 win, subwin
integer winctrl
print *, 'Output via print to default'
WRITE (*,'(//''Output via write to default'')')
i=winio$('%ww[no_border]&')
i=winio$('%pv%fr&',400,300)
i=winio$('%lw&',winctrl)
i=winio$('%hw',win)
i=winio$('%ww[no_border,no_maxbox]&')
i=winio$('%ca[win caption]&')
i=winio$('%aw&',winctrl)
i=winio$('%pv%53.10cw[hscroll,vscroll]&',6)
i=winio$('%hw',subwin)
WRITE (*,'(//''Output to default via write - 2'')')
WRITE (6,'(//''Redirected output to stdout/win via write'')')
print *, 'win', win
print *, 'subwin', subwin
END
My question is, am I doing something wrong or is I/O redirection handled differently under non silverfrost compilers?
Apologies for the spammy looking image links.
The Ftn95 version looks like this when run; [img]https://1drv.ms/u/s!AukE8rFa04Mei80MmsJQ04O1-dJXuw[/img]
The gfortran version looks like this; [img]https://1drv.ms/u/s!AukE8rFa04Mei80NeHq_Rq57xmghLQ[/img]
The source code can be downloaded from: https://1drv.ms/u/s!AukE8rFa04Mei80OKkVDq9RtEtL-eQ
I can share the compiler arguments if needed.
Regards
Ryan[/code][/b]