Home > Archive > Fortran > March 2007 > Fortran with a GUI??
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Fortran with a GUI??
|
|
| Nomad.C@gmail.com 2007-03-24, 7:04 pm |
| Ok another newbie question!
I know how people usually use fortran as a number cruching tool, but
is there a way to create a desktop GUI interface for a fortran
program? can I use fortran to program that interface, or do I have to
tie it with Objective-C (MacOSX) to achieve a desktop level kind of
GUI.
Thanks
Chris
| |
| Gary Scott 2007-03-24, 7:04 pm |
| Nomad.C@gmail.com wrote:
> Ok another newbie question!
> I know how people usually use fortran as a number cruching tool, but
> is there a way to create a desktop GUI interface for a fortran
> program? can I use fortran to program that interface, or do I have to
> tie it with Objective-C (MacOSX) to achieve a desktop level kind of
> GUI.
Nearly all Fortran applications can call the same APIs you would use in
C (using extensions). There are also several free and non-free GUI
libraries written just for Fortran. Actually, most of the free ones are
graphics (primitives like lines, arcs) without much support for GUIs.
Some of these are listed here:
http://www.fortranlib.com/freesoft....I%20Interfacing
http://www.fortranlib.com/comprod.h...I%20Programming
> Thanks
> Chris
>
--
Gary Scott
mailto:garylscott@sbcglobal dot net
Fortran Library: http://www.fortranlib.com
Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html
If you want to do the impossible, don't hire an expert because he knows
it can't be done.
-- Henry Ford
| |
| Arjen Markus 2007-03-26, 4:08 am |
| On 24 mrt, 21:30, "Noma...@gmail.com" <Noma...@gmail.com> wrote:
> Ok another newbie question!
> I know how people usually use fortran as a number cruching tool, but
> is there a way to create a desktop GUI interface for a fortran
> program? can I use fortran to program that interface, or do I have to
> tie it with Objective-C (MacOSX) to achieve a desktop level kind of
> GUI.
> Thanks
> Chris
One way to achieve a GUI front-end is to build
a GUI in the implementation language of your choice
and either have that call Fortran routines, thus
passing the necessary information or let it
write the input files for your Fortran program
and run that separately.
As Gary points out, you can also use a GUI library
to program the GUI directly in Fortran. I myself have
written a library to interface Fortran and Tcl/Tk
- see: http://ftcl.sourceforge.net. That can be
used for either solution.
Regards,
Arjen
| |
| Hani Ibrahim 2007-03-26, 7:05 pm |
| Nomad.C@gmail.com schrieb:
> Ok another newbie question!
> I know how people usually use fortran as a number cruching tool, but
> is there a way to create a desktop GUI interface for a fortran
> program? can I use fortran to program that interface, or do I have to
> tie it with Objective-C (MacOSX) to achieve a desktop level kind of
> GUI.
If you look for open-source GUI-Framework with Fortran-Bindings (means:
you can build a GUI in Fortran) you could look at:
JAPI <www.japi.de>
Based on Java's AWT (Do not offer all modern widgets). Development
stopped 2003. Good documentation and many sample files.
PILIB <http://sourceforge.net/projects/pilib> or
<http://pilib.beta-centauri.de/>
Based on GTK+. Alpha version. Less documentation. Less sample files.
I do not know whether you can bring these libraries to work on MacOSX.
Theoretically they should work on Macs.
Best regards,
Hani
| |
| widmar 2007-03-26, 7:05 pm |
| "Nomad.C@gmail.com" wrote:
>
> I know how people usually use fortran as a number cruching tool, but
> is there a way to create a desktop GUI interface for a fortran
> program? can I use fortran to program that interface, or do I have to
> tie it with Objective-C (MacOSX) to achieve a desktop level kind of
> GUI.
There are many ways, unfortunately none economical enough to build GUIs
for mostly throw away number crunching tools. One of few exceptions is
SDX software which supplies a common front end for general purpose
number crunching applications - without writing GUI code. For more,
please check our site.
---
sdx - modeling, simulation.
http://www.sdynamix.com
| |
| Gary Scott 2007-03-26, 7:05 pm |
| widmar wrote:
> "Nomad.C@gmail.com" wrote:
>
>
>
> There are many ways, unfortunately none economical enough to build GUIs
> for mostly throw away number crunching tools. One of few exceptions is
> SDX software which supplies a common front end for general purpose
> number crunching applications - without writing GUI code. For more,
> please check our site.
I think that quickwin (ivf), clearwin (ftn95), and MRWE (absoft) are
reasonably economical (as in they come with the compiler). Not that I
particularly like quickwin or clearwin, they are fairly useful,
especially for throwaway code.
>
> ---
> sdx - modeling, simulation.
> http://www.sdynamix.com
>
--
Gary Scott
mailto:garylscott@sbcglobal dot net
Fortran Library: http://www.fortranlib.com
Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html
If you want to do the impossible, don't hire an expert because he knows
it can't be done.
-- Henry Ford
| |
| Bil Kleb 2007-03-27, 4:19 am |
| Nomad.C@gmail.com wrote:
> Ok another newbie question!
> I know how people usually use fortran as a number cruching tool, but
> is there a way to create a desktop GUI interface for a fortran
> program?
If your program uses namelists, you could create
a web-based GUI with a micro web framework like Camping,
http://code.whytheluckystiff.net/camping/
without too much work if you're willing to throw
around a bit of (X)HTML and some Ruby -- see
http://rubyforge.org/pipermail/camp...ary/000262.html
for some background material.
Regards,
--
Bil Kleb
http://fun3d.larc.nasa.gov
| |
|
| Nomad.C@gmail.com wrote:
> Ok another newbie question!
> I know how people usually use fortran as a number cruching tool, but
> is there a way to create a desktop GUI interface for a fortran
> program? can I use fortran to program that interface, or do I have to
> tie it with Objective-C (MacOSX) to achieve a desktop level kind of
> GUI.
> Thanks
> Chris
>
I have used the GUI widgets in DISLIN (www.dislin.de). There is a
library for windows, mac-osx, and linux, and it it is free.
| |
| Ben Hetland 2007-03-28, 7:09 pm |
| widmar wrote:
> There are many ways, unfortunately none economical enough to build GUIs
> for mostly throw away number crunching tools.
In my experience, a lot of that "throw away" tools aren't really that
(i.e., "throw away"). Even though this code (which tends to be Fortran
source originating from a scientist's bright ideas, btw) often tends to
be adapted and compiled specifically for each number crunching job, the
code is generally sort of re-used over and over again for years -- or
decades in fact. This is maybe one of the reasons why Fortran is such a
persistent language, IMHO.
Many of these tools could definitely have benefitted from having a UI
(or GUI) build around them, instead of relying on some specially trained
individual to know about all the secret internals of the code, and where
and which array dimensions and parameter declarations to adjust before
each run. In fact a lot of such code IS actually embedded in a more
generic GUI tool.
My point? Well, the work of embedding (and perhaps some generalizations
of algorithms or ideas) is often complicated by the initial attitude
that the code is just a one time discardable piece of work. That might
later be the hindrance to its embedding being done at all, and instead
one settles for the suboptimal solution of having a "trained"
individually to do a lot of manual work for every job. (Sort of laziness
in an organization?)
--
-+-Ben-+-
|
|
|
|
|