My suggestion: create a procedural C# app by creating an app with a single
class. In your fortran app, each function call becomes a public method of
the class. The global variables become class-level variables (that you
create in your constructor). Create a 'main' method for the main function
in your Fortran app.
Then, if your project is a win-form app, have one of your controls create
this object and run the main method. If your project is a console app, have
the console app simply create the object and run the main method.
Input and output will be your biggest issues. Depending on how flexible you
want your app to be, I'd suggest you create a pair of interfaces, for an
Input object and an Output object. In your constructor, pass in objects
that implement the input and output interfaces. That way, you can change
how the input and output works by changing the object you pass in, without
affecting the Fortran app.
Note that Fortran was pretty specific about the way it performed math
operations. If your particular Fortran app does math operations, test
carefully (especially boundary conditions) to make sure that your C# app
operates in the same way. Look carefully at the data types that you use to
represent the values you are calculating. That can change the semantics of
math functions.
Hope this helps,
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"David Dvali" <da*********@ho tmail.com> wrote in message
news:u3******** ******@TK2MSFTN GP14.phx.gbl...
Hello.
I have one small program which I need to convert in C#.
The original source codes are written in Fortran 77.
Can anybody advice me what is the easy way to do this task?
Or may be there is some tools for it?
Thank you.