- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
program test
! The following USE statement provides Fortran interfaces to Windows routines
USE IFWIN
! Begin data declarations
integer lines,length
logical status
integer fhandle
Type(T_COORD) wpos
! Set buffer size variables
length = 80
lines = 90
! Begin executable code
! Allocate a console
status = AllocConsole() ! get a console window of the currently set size
fhandle = GetStdHandle(STD_OUTPUT_HANDLE)
wpos.x = length ! must be >= currently set console window line length
wpos.y = lines ! must be >= currently set console window number of lines
! Set a console buffer bigger than the console window. This provides
! scroll bars on the console window to scroll through the console buffer
status = SetConsoleScreenBufferSize(fhandle, wpos)
! Write to the screen as needed. Add a READ to pause before deallocation
write (*,*) "This is the console output! It might display instructions or data "
write (*,*) " "
write (*,*) "Press any key when done viewing "
read (*,*)
! Deallocate the console to free its resources.
status = FreeConsole()
end program test
page 85 of the manual there is a spelling mistake on line 15 of the above code.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it will fail on a 64 bit build as fhandle is hard coded at 32 bit.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It did not work at all. Suggestions to make it 32 and 64 bit. But I just tested in 32 and 64 bit and it appears to work on both.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, @JohnNichols. I submitted a bug report, DOC-10919.
I declared fhandle as a 64bit INTEGER, too, to eliminate that warning message. That message might just confuse a novice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
John, there is an integer kind called HANDLE specified in multiple of the Windows modules (e.g.kernel32).
integer(HANDLE) :: fhandle
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jim:
The latest sign on is a nightmare, I will have to increase my self medication of Diet Dr Pepper to cope with the stress. Find a code in an email program and then send a code to a phone, and then find the phone your daughter used all night to play games and she says, sorry Dad, it is dead. Charge phone, code has expired, start again, actually read the email account inbox, as I never use this account except as the logon for Intel and on the phone when it is charged and this started yesterday morning, get a Microsoft code, even in my Sunday - o God is it Sunday, make the pain stop, reach for the can it is empty, traverse the house to the frig, frig is empty, find the slab of cans in the boot and carry to the frig, thankfully it was freezing last night so I have a cold tinnie. Wonder what Microsoft has to do with Intel beside the obvious, remember Moore's law of Dr Diet Pepper, the cans will run out at midnight.
Get a nice email from @Barbara_P_Intel and chuckle. I wonder what poor small cubicle in the world, Karen lives in. I cannot send Karen an email, so could you say thank you.
Thank the Norse gods for Jim and then end.
John
have to work out how EXCEL uses t Stat in their Linear Regression analysis. Has to be code somewhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Typo fixed in the next release of the DGR (Developer Guide and Reference). It'll be available later this spring.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page