In Fortran, a clear difference exists between function and subroutine: functions return one value, subroutines return no value. This introduce a cascade of differences between the two. One example is the calling semantics: you can call a function just as in other languages, but in order to call a subroutine you must issue a call statemen...
I have a user-defined type vector. In another type, I have an allocatable array of vectors. I want to have a pointer to a single vector from this allocatable array. So I thought I would do this:
type(vector),allocatable,target::my_vectors(:)
and
type(vector),pointer::pointed_vec
But when I compile, the compiler complains that:
Thi...
Hi
Does anyone know if there is a maximum length for routine name and variable name in fortran 90 ?
many thanks
...
I have a function (in case anyone is interested, it is this function) in a module that looks like this
MODULE MYMODULE
IMPLICIT NONE
! Some random stuff
CONTAINS
CHARACTER*255 FUNCTION strtok ( source_string, delimiters )
[...]
END FUNCTION strtok
SUBROUTINE DO_SOMETHING ( )
CHA...
My setup is as follows:
OS: Windows 7 Home Premium 64-bit
Eclipse: Helios 3.6.1 64-bit with CDT
and Photran
Java SE Runtime
Environment: 1.6.0_21
Java Hotspot: 64-bit Server VM
(build 17.0-b17, mixed mode)
Cygwin 1.7.2 (32-bit)
My initial test Fortran application simply prints 'Hello World!' and exits.
The code builds and runs fin...
Is there a test suite out there that checks whether a Fortran compiler fully implements the Fortran 2003 standard?
...
I always assumed that fortran passed entities "by reference" to a dummy argument. Then I got this answer (the actual argument of the answer was related, but not on this)
The standard never specifies that and,
indeed goes quite a lot out of its way
to avoid such specification. Although
yours is a common misconception, it
was n...
Hi,
A coworke integrated the gdb into my emacs, so that i can single step through my code and it gets shown where i am in the emacs window. How do i do that with idb?
Unfortunately i cannot remember what we did then, so a walkthrough would be appreciated.
cheers
...
Hi everyone,
I have a program written in Fortran 90/95; after invocation it always reads a certain data file. For the users' convenience I'd like them to just have to place this file in the same directory as the executable itself, without making them set some environment variable/extend $PATH, and without forcing them to use a certain d...
what is the difference between these two codes
type Foo
real, allocatable :: bar(:)
end type
and
type Foo
real, pointer :: bar(:)
end type
in particular when it comes to the following code:
type(Foo) :: myfoo
allocate(myfoo%bar(10))
...
i would like someone to assist in converting this code to C++
c ----------------------------------------------------------------------
c Calculate pressure based on the generalized Peng-Robinson equation of state.
c for water.
c Variables Used ...
c T ... temperature (K)
c P ... vapor pressure (MPa)
c V ... volume (m^3/kmol)
c ---...
Are there any Open Source Java tools for parsing FORTRAN output? I'd like to be able to write something like
Format format = new Format("(1x, 2(F10.3,I3,' XY ',F7.3))");
String s = " -12345.897 XY 123.456-12345.897*** XY 123.456";
Result result = format.parse(s);
Note that it's specifically FORTRAN. Note the fun things like conc...