Rudamentary CONSOLE I/O Routines for Windows
From: Gary L. Scott (garyscott_at_ev1.net)
Date: 02/24/04
- Next message: Jugoslav Dujic: "Re: Embedding CVS Information"
- Previous message: TimC: "Re: modifying constants"
- Next in thread: Gary L. Scott: "Re: Rudamentary CONSOLE I/O Routines for Windows"
- Reply: Gary L. Scott: "Re: Rudamentary CONSOLE I/O Routines for Windows"
- Reply: Steve Lionel: "Re: Rudamentary CONSOLE I/O Routines for Windows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 23 Feb 2004 22:38:10 -0600
I've uploaded a beta (actually more like alpha, but there isn't much to
them to go wrong) of a set of console IO routines for windows that
reduce the Windows API complexity considerably for a small subset of
functionality. I keep reading of console difficulties here and these
make it fairly easy to do the most basic things. These partially
duplicate quickwin, but are even simpler and should work with other
windows compilers. Example:
call EZConsOpen() !Open the console
call EZConsSetCurPos(5,5,RETCODE) !Set position to row 5, column 5
call EZConsWriteText('string of text',RETCODE) !Appends text at cursor
position, leaves CP at end of string. To overwrite, repeat call to
EZConsSetCurPos, else text will append. To add EOL, insert or
concatenate char(10) to the text string.
There are no long winded security attributes, startup info, and process
info structures to mess with (well there are, but they're conveniently
hidden from view) and no null character appending (ditto). It is tiny.
There are 9 total routines to set attributes, generate control-c/break,
close console, etc. and it is interoperable with some (those I tested)
implementations of READ/WRITE. It works in console, graphics, or
Windows project types (except that console project type will
automatically provide a final "close window" prompt/wait). There are
two names for each routine, one long and one F77 compatible 6-character
short (short name EZCLSE is documented incorrectly but will fix). All
arguments are range checked so it isn't possible to set an out of range
value. Return codes are not yet fully documented as the error reporting
scheme has not been decided on. It is highly likely that I will alter
the error reporting scheme, removing the return code value from each
argument list. If sufficient interest is expressed, I will release the
implemented 9 routines for free/public distribution (if not, it will
fade away in about a week).
It is available here: http://www.fortranlib.com/EZCONSOL.ZIP
-- Gary Scott mailto:garyscottNOSPAM@ev1.net Fortran Library http://www.fortranlib.com Support the GNU Fortran G95 Project: http://g95.sourceforge.net
- Next message: Jugoslav Dujic: "Re: Embedding CVS Information"
- Previous message: TimC: "Re: modifying constants"
- Next in thread: Gary L. Scott: "Re: Rudamentary CONSOLE I/O Routines for Windows"
- Reply: Gary L. Scott: "Re: Rudamentary CONSOLE I/O Routines for Windows"
- Reply: Steve Lionel: "Re: Rudamentary CONSOLE I/O Routines for Windows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|