问题
Does ncurses library (originally developed with C in mind, if memory serves) have a port, or does an alternative exist which works well with fortran on a Windows platform?
Or, some library (since I've always used ncurses name when referring to "that sort of interfaces) which could be used to develop semi GUI on a command line prompt?
回答1:
With 2003 standard C-Fortran interoperability
http://genepi.qimr.edu.au/staff/davidD/
http://genepi.qimr.edu.au/staff/davidD/Curses/pdcurses.f95
http://genepi.qimr.edu.au/staff/davidD/Curses/ncurses.f95
http://genepi.qimr.edu.au/staff/davidD/Curses/testcurs.f95
回答2:
For the alternatives, you'd need the calls in
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682087(v=vs.85).aspx
If you are using IVF, the interfaces have already been done in kernel32.F90 in the IVF include directory.
On Windows platforms, to get cursor addressing to work in either kernel32 or ncurses, the Screen Buffer Size height and Window Size height in the cmd prompt properties must be set to the same value.
来源:https://stackoverflow.com/questions/23207032/does-an-ncurses-or-similar-library-exist-which-works-well-with-fortran