Topic: Porting from VB6

As a potential new user of Simply Fortran having coded many VB6 engineering programs still in use, is there any feature here which would help me port them to FORTRAN?

Re: Porting from VB6

Unfortunately, no, I don't think Simply Fortran has any tools to help such a port along.  I assume you're asking about maybe converting the GUI bits of VB6 programs, but our graphics package is considerably more low-level and limited.

Jeff Armstrong
Approximatrix, LLC

Re: Porting from VB6

Thanks Jeff for this comment.  The important part of our requirement is to port our mathematical modelling from legacy VB6 programs as they were relatively simple to write for non-specialist programmers, but now are unsupported and increasingly difficult to update and run.  We hope to use FORTRAN to re-code the calculations as library routines, called from a GUI interface code in another language.  Do you have any comment on the feasibility of this and the choice of language?

Re: Porting from VB6

ATR wrote:

We hope to use FORTRAN to re-code the calculations as library routines, called from a GUI interface code in another language.

This plan would be far more feasible.  If you're planning on building a library in Fortran to be called from another language, I have two major suggestions:

1. Only compile for 64-bit - 32-bit-only operating systems are disappearing.  The calling conventions for 32-bit code, notably on Windows, are varied and nightmarish to deal with.  64-bit code generally all complies with a single calling convention regardless of the compiler used.  You won't have to dance around with strange Fortran preprocessor directives forcing "STDCALL" or write aliases to Fortran functions.

2. Commit to using the Fortran ISO_C_BINDING module - every language can call C routines, generally.  If you declare C-compatible Fortran procedures that are "BIND(C)" with C-compatible argument types, you'll save yourself a lot of headaches and end up with a truly portable library.

As for which GUI option to use, it again depends on what you're trying to achieve.  If you're just on Windows, C# and Windows Forms would be a nice option, or you could even consider our AppGraphics package if you don't mind working with a decidedly small subset of GUI components.  If you're going cross-platform, Qt with C++ or Python with tkinter are both great options.  IUP is a nice, light option as well.  Some people like using Gtk-Fortran, but I find it generally too heavyweight and unwieldy.  Some of the newer, simpler GUI interfaces like Dear ImGui in C++ might fit the bill.

Jeff Armstrong
Approximatrix, LLC