Re: on CALL system('command') from Fortran



On Mar 31, 11:05 pm, "Nasser M. Abbasi" <n...@xxxxxxxxx> wrote:
Experts:

gfortran 4.6:

I was trying to see if I can call gnuplot from fortran to make a plot.

But it seems system() is not an intrinsic that is supported in
gfortran other than when using std=gnu. Googling around, it seems
this was rejected for being added to f2003, but may be in the
future it will be added?

It is VERY useful intrinsic to have.


Having fun with Gnuplot? I'm a fan.:-)

As Tobias suggested "system"is widely supported.

I use "call system()" in C-Graph to handle graphing with Gnuplot:
<http://www.codeartnow.com/code/download/c-graph-1/c-graph-version-2-
preview>

See c-graph.F90 for some tips on plotting (I'm still a Gnuplot newbie
mind you).

Let us know if "-fall intrinsics" works for you with std=f2003. Here's
the relevant line from section 2.2 of the Gfortran manual:

-fall-intrinsics
This option causes all intrinsic procedures (including the GNU-
specific extensions) to be accepted. This can be useful with -std=f95
to force standard-compliance but get access to the full range of
intrinsics available with gfortran. As a consequence, -Wintrinsics-std
will be ignored and no user-defined procedure with the same name as
any intrinsic will be called except when it is explicitly declared
EXTERNAL.


I don't ask as many questions as I could partly because I just don't
want anyone telling me to "RTFM". Even the most prudent among us can
find it difficult to find what they're looking for in a manual. I
learnt about f90 mode from Ian Bush in this group while battling with
g77. It would have taken me a few more weeks to make the discovery by
RTFM.

The "F" in the latter is from that frackin' brilliant TV sci-fi series
"Battlestar Galactica"
I'm off to drink toffee, prepare an ambush for the cylons - and RTFM!

rofl

agt
--
Freedom - no pane, all gaiGN!

Code Art Now
http://codeartnow.com
Email: agt@xxxxxxxxxxxxxx

.



Relevant Pages

  • Re: 6 gfortran bugs
    ... > I didn't see your patch at the gfortran web site. ... > integer kind argument I to the ACHAR intrinsic in ordinary expressions, ... > to all the intrinsics in all varieties of expressions? ...
    (comp.lang.fortran)
  • Re: 6 gfortran bugs
    ... >> to me to issue a warning instead of an error. ... >> where the gfortran maintainers hangout. ... As someone who has implemented some of the nonstandard intrinsics ... line 6: Intrinsic CDABS cannot be an actual argument ...
    (comp.lang.fortran)
  • Re: gfortran intrinsics
    ... here is the gfortran implementation of the INDEX ...   if ... of the intrinsics I am using should be replaced with a home grown ... necessary if I had a reference. ...
    (comp.lang.fortran)