Re: Rudamentary CONSOLE I/O Routines for Windows

From: Gary L. Scott (garyscott_at_ev1.net)
Date: 02/25/04

  • Next message: James Van Buskirk: "Re: Copy-in/Copy-out"
    Date: Tue, 24 Feb 2004 22:32:20 -0600
    
    

    "Gary L. Scott" wrote:
    >

    For those that have tried to use these, note that they are presently CVF
    specific (re: below statement about working with other compilers).
    Compiler-specific versions will be posted as/if required once the design
    is settled. The final release will be limited in capability and quite
    focused on "console" functions as you can get more sophisticated GUI
    functions via other tools (some free and some not). For now, I'm
    interested in what would be considered the MINIMUM set of routines
    required. The most frequent difficulty I recall is inability to perform
    an edit write (set current position and overwrite). No input routines
    are presently included. I assume hot key read, line read, and read
    character at cursor position would be desirable.
     
    > 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

    -- 
    Gary Scott
    mailto:garyscottNOSPAM@ev1.net
    Fortran Library
    http://www.fortranlib.com
    Support the GNU Fortran G95 Project:  http://g95.sourceforge.net
    

  • Next message: James Van Buskirk: "Re: Copy-in/Copy-out"

    Relevant Pages

    • Handling error/status messages by interface to C++ programs
      ... commercial C++ compilers, such as, for example, Borland compilers, like C++ Builder. ... They can also run either in the console or Windows mode, and send appropriate error and status messages. ... The interface would later display the messages in this or other way. ...
      (comp.object)
    • Re: CreateProcessAsUser - Process starts then exits
      ... Windows XP Media Center ... public Int32 dwX; ... public IntPtr lpReserved2; ... parent's console. ...
      (microsoft.public.win32.programmer.kernel)
    • Re: CreateProcessAsUser - Process starts then exits
      ... service most likely runs in a separate invisible session. ... the program I was trying to start was a windows forms app I ... public IntPtr lpReserved2; ... parent's console. ...
      (microsoft.public.win32.programmer.kernel)
    • Novell Client login form enables reading and writing from and to the clipboard of the logged-in
      ... Novell Client for Windows, ... Anyone with access to the computer's local operating system console, ... inject its own textual content into the clipboard of the currently logged-in ...
      (Bugtraq)
    • Re: Cannot Correctly Preview Fax in Fax Console
      ... I no way do I doubt what you are saying, but until now, all known problems with previewing faxes have had one of two causes: incorrect file associations for TIF files or end user error using Windows Picture and Fax viewer. ... >>>I have used the fax printer Windows accessory many times. ... The Fax console comes>>> up. ...
      (microsoft.public.windowsxp.print_fax)