Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Inputting Data

footer
Beginner
837 Views
Hi,

I just upgraded to CVF 6.6 from MSF 5.1. I'd like to know the best way to enter and read data from the screen.

In MSF 5.1 I used third-party peek, poke, putcursor and KeyRead routines to write a 2000 character text array directly to video memory with the appropriate attributes such as inverse video for data. Then I intercepted keystrokes and wrote the characters both to video memory and the text array. Then I used the Read function on the text array for the data input. The result was I had a very fast data input screen, even on a 4.77 MHz 8088.

My programs import perfectly except for those non-standard routines. What's the best way to accomplish data input in CVF? Any chance of scrollable windows?

Thanks.
0 Kudos
6 Replies
footer
Beginner
837 Views
Further to my above query, should I use Realwin, Winteracter, or VB.NET for the GUI, or can I use Quickwin or other intrinsic routines of CVF 6.6?

If I use 3rd party software, I probably have to worry more about updates 5 years from now than if I try to do it with CVF.
0 Kudos
Steven_L_Intel1
Employee
837 Views
I think QuickWin will meet your needs - you need to forget about writing to video memory! Just do standard Fortran WRITE and READ. You'll get a scrollable window.

Steve
0 Kudos
footer
Beginner
837 Views
Thanks, Steve.

If I use the Write command to paint my 80x25 character text array to a window, Quickwin has routines to control cursor movement only to those screen locations I designate as data and also draw boxes around the data or change their attributes? I don't suppose you have any sample programs for a simple data input screen.
0 Kudos
Steven_L_Intel1
Employee
837 Views
QuickWin does have routines to move the cursor around, write text with different colors, draw lines, etc. All of our documentation is at http://compaq.com/fortran/docs

I have never seen a program that does exactly what you want (or what I understand you want). Note that you can get a 30-day free trial from participating resellers - see the web site's "where to buy" list.

Steve
0 Kudos
footer
Beginner
837 Views
Shortly after the PC was introduced, applications started popping up where there would be a static input data screen and the user could tab or use the cursor to move between data cells, which were typically inverse video. When color screens were introduced a blue screen with white data cells seemed most popular. The "F" keys were used for saving, retrieving, calculating, etc.

I needed that functionality in Fortran. But writing 25 lines to the screen using Fortran Write took a long time and Fortran had no commands for moving around the screen, so I found some assembly routines I could link to Fortran. Poking 2000 characters to video memory with a Do Loop is instantaneous on any computer.

I still need the same functionality - Input the design data as text, Calculate, Review the output, then go back and adjust the input until I'm happy with the output. Pretty simple. Looks like the QuickWin functions will do it.

Thanks for the help, Steve.
0 Kudos
isn-removed200637
837 Views
Why not try using a dialog box for data entry?
You can use edit boxes labelled with static text to enter your data (I presume numbers) as characters, retrieve the character string using a call-back routine,
check for mistakes (non-numeric characters etc.) do an internal read/write to convert to integer, real numerical data and then go off and do your computations using the numerical data and return computed data to other edit boxes in the dialog for your delectation. Just select a dialog box project and carry on from there.
If you so desire, you can add all sorts of bells and whistles (coloured controls etc) to make it eye-catching.
0 Kudos
Reply