Topic: Programming with mixed language

Hi dear SF-Users and admin,

I'm new to using the SF and I'm testing now this tool and have very simple question:

1. It is possible to make a project with mixed language like C++/C/Fortran with help of SF?

2. And my ultimate goal - is a simple Win-application with ploting in 2D the resulsts (Polar and simply Y=F(x) - Plot etc.) and 3D graphics (Vector Field and ISO-Surface).

3. It would be great and a multi-window user interface to do with the ability to view the model in 3D.

Do you have any example ?

Thanks is adanvce and best regards,
Andrew
P.S.  I use Win10x64 and SF 3.xx

Re: Programming with mixed language

Andrew,

You can mix C and Fortran in Simply Fortran.  We do ship a C++ compiler, but it isn't full-featured. 

Plotting can be difficult.  We provide a very simply plotting interface, Aplot, for making 2D plots (bar, scatter, line), but we don't provide anything beyond that with Aplot.  You can look at what's available in the SF Package Manager, but those packages are provided as a convenience and a separate subscription.  We didn't develop any of these libraries; we're simply making them available.

You can create a multi-window interface using AppGraphics, GTK+, and possibly other GUI toolkits (DISLIN, possibly?).  However, if you want to integrate 3D graphics, you'll probably want to stick with GTK+ with PLPlot support.

We don't have an example of 3D plotting, but we have simpler examples.  You'll notice "Conway's Game of Life" listed in the Start panel in Simply Fortran when you first start the development environment.  That can provide a simple example of how AppGraphics works.  The GTK-Fortran project provides some examples that should work with our package in the SF Package Manager. 

What you're proposing is possible, but it isn't necessarily simple to demonstrate.  You'll need to use some sort of Fortran-accessible GUI and plotting library to get where you want to be.

Jeff Armstrong
Approximatrix, LLC

3 (edited by Carlos Herrera 2020-05-14 09:06:13)

Re: Programming with mixed language

Andrew,
I did not try it, but maybe the fortran interface to gnuplot ogpf (https://github.com/kookma/ogpf) will suit your purposes. Gnuplot (http://www.gnuplot.info/)  is very popular in scientific community for 2D and 3D data visualisation.
Carlos