Okay, I managed to get it to compile, but the cursor positioning routines (2 available, as far as I can tell from reading the include file) just don't work. Here's my code:
program console
implicit none
include 'win32api.ins'
integer row ! Row on screen, should be 1-25.
integer col ! Column on screen, should be 1-80.
write(*, 10)
10 format('Row? ⇒', $)
read *, Row
write(*, 20)
20 format('Col? ⇒', $)
read *, Col
! Call SetConsoleCursorPosition(Col, Row) ! I hope this works.
Call SetCursorPos(Row, Col)
print *, 'Hello from ', Row, ':', Col ! Print output to screen.
end program console
And here's the output I get:
Row? ⇒10
Col? ⇒15
Hello from 15: 10
Press RETURN to close window . . .
Clearly I'm doing something wrong, but what?
-BPL