qtConsole from QT Software
qtConsole – A Fortran Library for Configuring the Output to Windows’ Console
Standard Fortran does not offer any way to alter the output to the Windows Console (DOS box) when using READ and WRITE’s. qtConsole offers the programmer various ways to configure the output including:
- Coloured text and numbers
- Positioning the cursor
- Clearing the console.
- Position the console window relative to the desktop
- Change of the number of character rows and columns to be buffered by a console.
Most Fortran programs use READ(*,…), PRINT and WRITE(*,…) statements for console output (under Windows the console is also referred to as the DOS box, DOS command window). The Fortran standard stipulates the use of one single colour (usually white text on black background). But, with the qtConsole function qtConSetTextColor a foreground and background colour can be set (256 colour combinations are at your disposal). With this, your PRINT and WRITE(*,…) commands will output coloured texts and numbers.
Additionally, the function qtConWrite allows the position of text output (by row and column specification). With this, you may highlight texts and numbers, so you can catch the users attention, for example, if a value runs out of range.
Also, the size of the console and the size of the console window can be controlled. To clear the console, simply call qtConClearConsole.
If you think the console’s cursor is too small – default size is usually 25% of the font size – change its size ny calling qtConSetConsoleCursorSize, for example to maximize it to 100%. Or if you want to make the cursor invisible, give it a size of 0.
Within the coordinates range of a console the cursor can be positioned calling qtConSetCursorPosition. Then, the output of a PRINT and WRITE(*,…) command starts at the cursor position set. Or a READ(*,…) command expects user input starting at that cursor position.
Here is complete overview of the qtConsole functions:
|Console Size and Position|
|qtConGetConsoleBufferSize||Get the size (rows and columns) of the internal console buffer|
|qtConSetConsoleBufferSize||Change the size (rows and columns) of the internal console buffer|
|qtConGetConsoleCoordinatesRange||Get the console coordinates’ range|
|qtConGetLargestConsoleWindowSize||Get the maximum size of the console window|
|qtConGetConsoleWindowCoordinates||Get the coordinates of the console window (relative to the desktop)|
|qtChangeConsole||Change the size of the console window|
|qtConSetConsoleWindowPosition||Position the console window (relative to the desktop)|
|qtConGetPrimaryScreenSize||Get the resolution of the primary screen|
|qtConGetCursorPosition||Get cursor’s position|
|qtConGetConsoleCursorSize||Get size of the cursor|
|qtConSetConsoleCursorSize||Set cursor’s size (0 – 100)|
|qtConGetTextColor||Get active color (used for output)|
|qtConSetTextColor||Set active color (for subsequent output)|
|qtConConvertToColorValue||Convert color code into an integer value|
|qtConWrite||Output text, optionally position|
|qtConClearConsole||Clear the console|
|qtConSetConsoleWindowTitle||Change the title of the console window (caption)|
|qtConFlushConsoleInputBuffer||Flush the console input buffer (clears READ buffer)|
|qtConGetErrorInformation||Get the meaning of an error code|
Scope of Supply
qtConsole consists of a static library (.lib) and several pre-compiled MODULE files (.mod). The functions and their usage is described in the manual (PDF), including examples and several illustrations.
To ease usage, a demonstration program (Ex01.f90) is provided, that demonstrates many essential functions. For all compiler systems that are supported (see below) ready-to-use projects are provided, that include the demo program and all the other files needed. So, after loading the project, a “Build” will create the demo program (Ex01.exe). Compare the “Instructions for Installation and First Usage” below.
At present the following variants exist:
- Compaq Visual Fortran v6.6
- Intel Visual Fortran (Win32) v10.1 and higher
- Silverfrost FTN95 (Win32) v5.5 and higher
It may be that compatible compilers can use qtConsole too. Try yourself using the evaluation version (see below). If you own a compiler that is not supported by qtConsole, but you would like to have a binding for this, let us know (mailto:firstname.lastname@example.org). If there is sufficient demand, we will try to develop a version for your compiler.
You can download an evaluation copy here which has a few functional limitation (1) including the manual (PDF (2); download size: about 1.6 MB):
qtConsole.zip or as self extracting archive
- Create a directory on your PC (e.g. C:qtConsole).
- Copy the file you have downloaded into this directory.
- Unzip this file into this directory.
- Then you are ready to start one of the files suitable to your development system: CVFEx01Ex01.dsw, IVFEx01Ex01.sln, or FTN95Ex01Ex01.ftn95p (a double click on the file symbol in Windows File Explorer should start-up your development environment), which create the demo program Ex01.exe.
- After this perform a “Build”.
- The Ex01.exe should be built and you can run it.
(1) The evaluation copy allows the usage of all functions until the end of the year. When starting a program that calls qtConsole functions a message box pops up at the beginning which displays a message accordingly. On purchase of a qtConsole Licence you will receive a licence file, which activates the “full version”, that can be used without limitation (no message box, no time limit).
The evaluation copy is converted into a fully functioning version by purchase of a qtConsole licence (no re-installation necessary).
A qtConsole licence grants a single named user (the licensee) the usage of the qtConsole software (single user licence) for to create applications (.exe) that he/she may distribute freely. This means, there are no runtime fees or any other royalties to be paid additionally. The complete licence conditions are to be found in the manual.
The licence is supplied (QTCON.0010) by sending a licence file via email. The licence file contains the data the licensee specifies (name and address), the licence number, and the licence key.
To use the qtConsole software the following is needed
- PC running Windows, hard disk with about 6 MB available.
- One of the following operating systems: Microsoft Windows 2000, Windows 2003, Windows XP, Windows Vista, Windows 7.
- A Fortran compiler system as supported (see above).
What do our Customers say about us?
Bob worked tirelessly over many hours (and days!) to try to resolve the issue. His efforts were truly appreciated on my behalf. He was polite, caring and nothing was too much trouble. Many, many thanks Bob.JO
Best technical support for a software program that I’ve come across – painless for once!KH, Tunbridge Wells, UK
Your technicians are always really friendly, reassuring and helpful.HM, Cambs, UK
Our Account Manager, Stephanie, was fantastic in dealing with our questions and my colleague’s concerns (many thanks Stephanie!) and your colleague Joe has provided invaluable assistance to my colleagues and myself during our initial and extended testing phases of Reference Manager.JH, Birmingham, UK
For the time being we are unable to offer the following product ranges although we are currently working hard to increase the number of products we can offer in the future. Please contact us to talk about alternative products that we may be able to offer you.