Fax: +44(0)1865 300 232
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:
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:
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
Instructions for Installation and First Usage:
(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