Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

console app in visual fortran 6.5

Status
Not open for further replies.

JackRnl

Chemical
Dec 20, 2005
6
I have an old program using Escape sequences for userinteraction on a screenbasis. It has bene working on many different systems and all those escapesequences are generated in ONE routine working on the definition of what has to be shown.

Now (after over 10 years) I need to make that program run under XP . I tried loading ANSI.SYS and some 'solutions' i found on the web but no succes.

So I think best thing to do now is to rewrite that routine that's actually displaying the escapesequences (I've done that in the past for a number of systems so that's not a big deal as such) and use 'something else'.

I just 'played' a bit trying to get a consolewindow . I can position cursor and write something, but i still don't know how to read a KEY, how to use color and such things.
So i wonder if a good example exists showing how such things can be done.
I also don't know if a another approach (NOT using a consolewindow) wouldn't be suited more.
As I expect others to have experience with such a conversion I would appreciate any help.

It's OK to me if I need/can use C++ / C# or VB to 'assist' in creating those (interactive) screens

thanks in advance
 
Replies continue below

Recommended for you

You can use ANSI.sys but it has to be from command.com: not cmd.exe. This means that everything runs as 16-bit. When it crashes, it is quite spectacular: it takes down all the 16 bit programs with it.

Alternatively, have a look for ansicon on the net. The website keeps on moving.

Which compiler are you using? The current version of g95 doesn't seem to translate the ANSI sequences correctly. It worked on g95 3 years ago. Don't know about gfortran.

Another alternative is to use Silverfrost - it will do the windows type things: same as what you would do in C++/VB but you don't have to learn a new language and all its idiosyncracies.
 
Sorry - just noticed you were using CVF. You can access screen addressing using the win32 calls if you're using CVF.
 
thanks for the info, I'll go through them.

a) I will try command.com, but I'm not sure if I cna use it. I still have the version using FTN77 with DBOS. (Salford --> Silverfrost). If THAT would be possible all would run at once without doing ANYTHING. But I'm afraid that won't work as FTN77 used 32 bits.
Of course I will try CVF with it as well.
(I will do both next week as I have a LOT of things to do this week)

b) I had a look at Ansicon before, but I couldn't get it running with my software (I also tried a program called DosBox).

c) I'm considering Silverfrost FTN95

thanks
 
Siverfrost have a FREE version of FTN95 for personal use, this SHOULD compile your FTN77 code with minimal (or may be no) changes.
 
You can run 32 bit programs on command.com - this uses config.nt and autoexec.nt - the dos equivalents of config.sys and autoexec.bat.
 
Does VB work with Dos box windows? Hmmm. I know QuickBasic does (from which VB sprang).

From my past experience with QB, it is an excellent language for simple Dos screen manipulations (with color). And, since you are already a fortran programmer, picking up the little bit of QB you need for the task would be a breeze.

Dan :)
 
Depends which version of VB. Basically, you need to use the VB equivalent of SetConsoleCursorPosition.

VB6 is a bit of a frig but you can get it to do console programs.

VB.net can do console programs.

VBScript can also do console programs but cursor addressing can be difficult.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor