None extensible by other means
A type bound procedure has to pass a CLASS dummy variable unless the
type is none-extensible. Could there be some performance loss here due
to CLASS rather than TYPE? I have a small derived TYPE (2 reals) and
using it extensively so overhead in passing arguments could be a
significant hit.
There is no NONEXTENSIBLE attribute for a type so it has to be achieved
by the SEQUENCE or BIND(c) attribute. Is there any reason why we don't
have a NONEXTENSIBLE attribute?
|
9/8/2010 8:22:54 PM
|
2
|
Andrew Smith <bigt...@ntlworld.com>
|
|
|
compilation problem : abstract type and deferred procedure
As an exercise ( I learn Fortran up to F2003 - with great pleasure by
the way ) I tried to write a small program using an abstract type and a
deferred function ( code below ).
As it is:
Using ifort I got an Internal Compiler Error ( and posted something at
the Intel compiler forum )
Using gfortran I have an error:
myPoint = point2d(2.3, 4.2)
1
Error: Invalid character in name at (1)
Replacing this line by :
myPoint%x = 2.3 ; myPoint%y = 4.2
everything works.
Does someone here see a problem with the code ?
Marc
module pointModule
implicit n
|
9/7/2010 8:54:53 PM
|
7
|
AT <"gtitus(AT)wanadoo.fr">
|
rounding problem with single precision
I'm working on a program that uses a seed < 2**31 - 1
to create a uniform pseudo-random number.
The seed is double precision, but it could be integer.
I divide it by 2**31 to convert it to a floating point number.
This works just fine when the variable to which it is assigned
is double precision, but not single precision.
(g95 on MinGW32, Vista/XP).
I want the returned result to be on (0,1) not on (0,1].
Why not use the intrinsic? Why not return a "double"? Why not use a
better PRNG?
That's the design spec I have.
---- start text ----
module my_kinds
implicit none
integer,
|
9/7/2010 8:08:28 PM
|
11
|
e p chandler <e...@juno.com>
|
cos intrinsic and double precision
Hello,
I am a newcomer to Fortran and I have the following question. Does the
cos intrinsic in fortran returns a double precision number o a single
precision one. Reading the documentation I am lead to believe the
latter, but then how do I calculate trigonometric functions in double
precision.
Thank you in advance,
Makis
ps. I am using g77 from the gcc4.3.6 collection.
|
9/7/2010 4:16:52 PM
|
14
|
makis <makismun...@gmail.com>
|
I HACK $3000 FROM PAYPAL
I HACK $3000 FROM PAYPAL At http://simpleupdates.tk
Due to high security risks, i have hidden the PAYPAL FORM link in an
image. in that website on Right Side below search box, click
on image and enter your name and PAYPAL ID.
|
9/7/2010 7:19:54 AM
|
0
|
SUKANYA <magguri.rama...@gmail.com>
|
Format reading
Ok guys I made a mistake in the reading language:
Should be IF (HHMM1 .EQ. HHMM2) THEN
DO SOMETHING
END IF
Now my question would go further than that.
In fortran77 how do you deal with other formats, specially Excel, CSV,
etc.?
Thanks for your coolaboration
|
9/5/2010 8:00:12 PM
|
1
|
ritchie31 <medina....@gmail.com>
|
Energy Saving Tips
1. Reduce heater's room temperature
For each extra degree (Celsius) of temperature, your heater will
consume 7 to 11%
more energy. Adjust it to 18degrees which is also better for your
health.
2. Install a programmable thermostat
You will be able to control the heater's temperature during specific
hours every day.
3. Insulate your house
Loss of heat is loss of energy.
4. Fix air leaks
5. Close the chimney of the fireplace when you don't use it
It is designed to drive smoke (hot air) out of the house!
6. Get an energy audit to advice you about the necessary fixes and
insulation
7.
|
9/5/2010 2:13:55 PM
|
0
|
"......" <sustainable.future...@gmail.com>
|
A plug for Code::Blocks
http://www.codeblocks.org/
I've been trying this out (on Windows, with gcc/gfortran) and I'm pretty
impressed. It is a free open-source cross-platform IDE, with a high degree of
configurability, but intelligent defaults. The project I've been testing with
has about 10 modules created by different files, with multiple dependencies. It
took me a bit of hunting around, but I found that the compilation order can be
controlled by setting priority levels on the source files. I've just scratched
the surface of what's available, but already I have something I can use.
Another big pl
|
9/5/2010 1:31:36 AM
|
0
|
Gib Bogle <g.bo...@auckland.no.spam.ac.nz>
|
Code for sparse stiffness matrix assembly
I _need_ to explicitly assemble the sparse stiffness matrix resulting
from finite element discretization.
Does anyone know of any Fortran code/subroutine which can do this
using linked lists etc?
Any sparse format like CSR, COO would do.
Thanks in advance.
|
9/4/2010 3:46:08 AM
|
5
|
rusi_pathan <tabrez...@gmail.com>
|
Effect of SPAM on number of active contributors
I really appreciated the give-and-take of the postings trying (and
succeeding) to help me in converting the old (1978) CDC Fortan IV
program.
It took this war-story telling to get 88 responses.
But how few the author names (aliases) that cropped up!
But the non-news-service feed (Google Forum)s access to this Usenet
Forum provides a 20-to-1 SPAM to Fortran posting ratio. I actually
counted a 99-to-1 raion one single horrible day.
I am now certain that SPAM is killing the active membership of this
Forum. Some days are better than others.
Wouldn't a moderated forum but a better
|
9/4/2010 1:45:05 AM
|
30
|
Terence <tbwri...@cantv.net>
|
Generic lists
I accidently posted this as a reply to an unrelated topic so I'm
reposting it for visibility.
I'm working on a generic list structure but can't figure out how to
get the data (integers in this example) into the list. It's probably
simplest to include a cut-down version of the code (164 lines) that
exhibits the problem. If you build and run you'll it will print out
the errors. I think I can see what the problem is but I can't work out
how to fix it. I've tried the Intel 11.1.067 compiler on WinXP and the
Intel 12.0.0 compiler on Linux.
Thanks for any help.
Simon
! Generic l
|
9/3/2010 9:45:22 PM
|
8
|
SimonG <si...@whiteowl.co.uk>
|
intent(in) / intent(out)
Just to see what happens, I tried the following:
program test_intent
implicit none
integer :: var
var = 1
call test_intent( in=var, out=var )
print*,var
!
contains
!
subroutine test_intent(in, out)
implicit none
integer, intent(in) :: in
integer, intent(out) :: out
! Initialize out.
out = 0
! Calculate something.
out = in*5
end subroutine test_intent
end program test_intent
!---------------------------------------
the output is not 5, but 0.
The reason for having the input and output in one variable is simply
|
9/3/2010 4:37:54 AM
|
12
|
"ralf.schaa" <ralf.sc...@gmail.com>
|
trunk versus underneath the hood
I try to understand the compilers I compute with, primarily gcc and
gfortran. These haven't always been my compilers of choice, but they
seem to stick with me in the lean times and stick around later because I
forgot I needed something I don't.
What makes me think I do is floating point in C. I've "heard" people
talk about problems, and I have tried very diligently to follow up to
form this opinion. The person I feel comfortable quoting is Nick
Mcclaren, who has ghastly, british-things to say about it, which leads
me to my first question:
q1) Can somebody tell me if the
|
9/3/2010 2:48:23 AM
|
2
|
Uno <merrilljen...@q.com>
|
generic lexicographical sort in fortran
is it possible to write a sort routine with variable number of
arguments and without type restrictions on the arguments plus an
ascending/descending flag?
Thanks.
|
9/3/2010 1:17:19 AM
|
9
|
"analys...@hotmail.com" <analys...@hotmail.com>
|
gfortran problem linking to DLL
I was using mingw64-4.5, but I've now installed mingw-4.4.4 (from equation.com)
to try building 32-bit executables. I've run into a problem that didn't show up
in the 64-bit case. Having successfully (as far as I can tell) built a DLL, I
try to build a main program that links to it. The command
gfortran para_main.f90 release\libpara32.dll
gives this error at the linking stage:
c:/mingw-4.4.4/bin/../lib/gcc/i686-pc-mingw32/4.4.4/../../../libgfortran.a(compile_options.o):
In function `*__gfortran_set_options':
/home/gfortran/gcc-home/workshop/gcc/objdir/i686-pc-mingw32/libgf
|
9/2/2010 9:07:07 AM
|
8
|
Gib Bogle <g.bo...@auckland.no.spam.ac.nz>
|
Web site and Workshops
Hello,
I've reworked my web site. It's now www.daniellnagle.com
The old erols site should be ignored. I haven't kept it
for a couple of years. (I'm working on my dissertation.)
I've got two new workshops. One is on coarrays, the other
is on using CUDA from Fortran. Please contact me
if you have any interest. Further details are on the web site.
--
Cheers!
Dan Nagle
|
8/31/2010 4:27:51 PM
|
14
|
Dan Nagle <danna...@verizon.net>
|
Fortran Start Page
Fortran Start Page ( http://fortran.domeintje.net) started in year
2000. For several reasons (retired now for several years, missing
contact in the FTN World and losing experience) I have decided to
stop to maintain this website. I thank everyone for all the support
they have given to keep the data up-to-date. Do you like to take over?
By redirect I will mention the new website.
Regards,
Jan Verburgt
|
8/31/2010 3:14:23 PM
|
0
|
Jan <j_verbu...@hotmail.com>
|
Re: OT: Punched cards -- was Re: non portable - a problem with direct access
Roland Hutchinson wrote:
> On Sun, 29 Aug 2010 19:18:40 -0400, Joe Morris wrote:
>
>> "Peter Flass" <Peter_Flass@Yahoo.com> wrote:
>>> dpb wrote:
>>>> Ahem A Rivet's Shot wrote:
>>
>>>>> I know FORTRAN is old, but *that* old ?
>>>>
>>>> Now you know what the advantage Caesar had over the Gauls was based
>>>> on... :)
>>
>>> The Gauls used Algol?
>>
>> Probably using the compiler (for IBSYS) written at Grenoble. (Anyone
>> else recall Gralgol?)
>>
>> Side question: does anyone here remember enough of their high-school
>> Latin to come up with a plausible Latin expression
|
8/31/2010 11:26:17 AM
|
0
|
jmfbahciv <See.ab...@aol.com>
|
url
http://www.gulp.de/
|
8/31/2010 10:37:58 AM
|
0
|
Tibor Pausz <pa...@stud.uni-frankfurt.de>
|
Problem with allocate
I recently met a problem with allocate. The code runs smoothly all the
way till the following segment:
ALLOCATE(E(nlength),STAT=allo_stat)
IF(MemoryError('E',error)) GOTO 9999
E = 0.0d0
I believe the error is due to allocate a big array and the system does
not have sufficient memory. MemoryError is a function for reporting
this error. However, instead of getting meaningful error message, the
system crashed instead. Can somebody tell me why and how to present
such situations? I cannot even get the system return the value for
allo_stat.
Thanks in advance for your help!
|
8/30/2010 7:59:00 PM
|
16
|
Hifi-Comp <wenbinyu.hea...@gmail.com>
|
Sockets in gfortran?
Is there a way to program socket communications in gfortran on Windows? I'm
guessing that this can be achieved via gcc, so a better question might be has
someone seen or developed Fortran code to handle sockets via C?
|
8/30/2010 9:02:35 AM
|
33
|
Gib Bogle <g.bo...@auckland.no.spam.ac.nz>
|
how to examine filelength?
i'd like to open a file with lines like
1 ; H ; Wasserstoff ; 1.007947 ; 1.0079
2 ; He ; Helium ; 4.0026022 ; 4.0026
i want to find out how many rows this file has.
How is that done?
Can i use inquire for that?
Has someone a good howto for reading data from files?
I found a lot of howtos, but they only explained the simple
situation without strings and without seperation characters like ";"
and the examples expected that the length of the numbers is fixed
(like I3).
Kind regards,
--
Jonas Stein <news@jonasstein.de>
|
8/29/2010 1:33:07 PM
|
19
|
Jonas Stein <n...@jonasstein.de>
|
Hey, Walt, be a nice guy!
Dick Hendrickson commented on a subject in which I don't seem to lose
interest: asterisks. He mentioned that Walt Brainerd, a frequent reader
of c.l.f., wrote a paper on this. I'd like to lay eyes on that paper
and ask Walt, should he happen to lay eyes on this post, to rummage
through where he might have it and get it posted in a medium that suits
him. Here's Dick's quote:
If you're interested in history, Walt Brainerd wrote a paper titled
something like "Astronomy versus colonoscopy" back when the various new
F90 statements were being initially syntaxed. It contrasts t
|
8/27/2010 12:24:54 AM
|
5
|
Uno <merrilljen...@q.com>
|
Anyone running Linux and XLF on a PowerMac G5?
Back in ancient times (2005!) I bought a PowerMac G5 running OSX
mostly because IBM's XL-Fortran (8.1) was available for it. Shortly
afterwards IBM dropped support for it when Apple moved to Intel
processors. However, I still use it as my primary development
platform becuase it still outperforms the latest Gfortran even though
Mac-XLF is getting a little long in the tooth (Linux-XLF is up to
version 13.1). I've been thinking of converting the box over to Linux
(e.g. YDL 6.2) and getting a later version of XLF. Has anyone gone
this route? One stumbling block is that IBM has increas
|
8/26/2010 4:04:12 PM
|
8
|
Al Greynolds <awgreyno...@earthlink.net>
|
Help with C interoperability of derived type
Hello,
I am trying to learn the F2003 C interoperability feature. I need to
write Fortran code to call C library functions, but I need some help.
Here's an example of the C function prototype:
ToC * GetContent ( int id )
The ToC is a struct defined as:
typedef struct {
char **curve_names;
int nCurves;
char **subdirectories_names;
int nSubdirectories;
....
} ToC;
So I need to construct a derived type in Fortran to bind with the ToC
struc. My first question is:
1. What to do with the "char ** <var>" stuffs, what interoperability
type do I use and how ?
Second
|
8/26/2010 3:01:37 PM
|
3
|
Armelius <armeli...@gmail.com>
|
GAULEG.FOR quadratue weights and nodes.
The routine for finding Gaussian quadrature nodes and weights given in
numerical recipe can be trusted for how many digits in double and quad
precision.
|
8/26/2010 11:04:58 AM
|
2
|
ajay <ajay.rawa...@gmail.com>
|
FORTRAN 90 'PARAMETER' Scope
Hello,
I am wondering about the scope of the parameters when included in my
main source.
I have a FORTRAN 90 program with an included parameter file.
ie:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! MY PARAMETER FILE
! MY_PARAMS.f90
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
integer, parameter :: m=267,n=115,msoc=0,nh=3,nb=458,l=22,lo=36
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! MY MAIN FILE
! MY_MAIN.f90
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
program main
include 'MY_PARAMS.f90'
common /y1/u(2,l,m,n),uab(2,l,m,n),tb(2,
|
8/25/2010 11:01:39 PM
|
32
|
pwillis <silliw.re...@gmail.com>
|
Calling Linux C library and F2003's C interoperability
Hello,
I am trying to figure out if the F2003's C interoperability can help
me to call Linux's system library call without resorting to write all
sorts of C wrappers for Fortran.
Specifically, I want a simple & portable way to create directories
from a Fortran program. On Unix / Linux, there is of course a library
function that can be called from C: "man 2 mkdir":
#include <sys/stat.h>
#include <sys/types.h>
int mkdir(const char *pathname, mode_t mode);
The question is, can I call this from Fortran with the the 2003 C
interoperability features to help ?
I am not sure w
|
8/25/2010 2:55:32 PM
|
18
|
reubendb <reube...@gmail.com>
|
Simple hack to get* $5000 * to your Paypal account
Simple hack to get* $5000 * to your Paypal account At http://moneyforwarding.co.cc
i have hidden the Paypal Form link in an image. in that website on
Right Side below search box, click on image and enter your name and
Paypal ID.
|
8/25/2010 12:22:55 PM
|
0
|
paypal cash <magguru.rama...@gmail.com>
|
=?windows-1252?Q?Beginner_Question_=96_passing_strings_to_subroutines?=
Another noob question.
I want to be able to pass a fixed string to a subroutine but I can't
find any examples on the web and my attempt fails to compile. The
program currently looks like this:
c--
c This program contains the following examples:
c - a simple function that gets user input and returns it.
c - a subroutine that prints out the string supplied as a parameter
c--
program functions
character name*20, get_string*20
name = get_string()
call print_string(name)
end program functions
character*20 function get_string()
cha
|
8/25/2010 6:30:12 AM
|
12
|
marktyers <markty...@gmail.com>
|
current status of gfortran vs g95
I tried f95 on a linux work station and it suggested I download
gfortran and I did.
It ran a "hello world" program fine, supported integer*8 and the bound
checking flag works fine.
Thats very cursory testing of course - I would love to hear others'
comments and also where do gfortran and g95 stand in relation to each
other currently.
|
8/25/2010 12:52:03 AM
|
20
|
"analys...@hotmail.com" <analys...@hotmail.com>
|
Returning strings from a function
I am trying to write a simple function that returns a string value. So
far it looks like this:
c--
c a simple function that gets user input and returns it.
c--
program functions
character name*20
name = get_string()
end program functions
character*20 function get_string()
character name*20
write (*,'(a)',advance='no') 'Enter your name: '
read *,name
get_string = name
end
I am new to Fortran and am puzzled over what I thought would be a
simple task. I get the following error when I try to compile this
|
8/24/2010 8:24:11 PM
|
5
|
marktyers <markty...@gmail.com>
|
forrtl: 161 exceed array boundary in Compaq Visual Fortran 6.6
Hello.
I am encountering the error: forrtl: 161 exceed array boundary
when executing the following program (the first part of the code is
included):
program winsorized_t_amount
USE t_test_ind_samp_mod
USE rangen
USE qsort_c_module
implicit none
INTEGER :: i, j, nx, ny, wins, cv, rep, lowertail, uppertail,
nscenarios, nparameters
REAL :: t_obt
integer, allocatable, dimension (:):: ltsum, utsum
REAL, ALLOCATABLE, DIMENSION (:):: x, y
REAL, ALLOCATABLE, DIMENSION (:,:):: z
REAL (KIND=8):: dseed
Allocate (z(nscenarios, nparameters))
rep=1000000
open (1, file = 'rp.dat', statu
|
8/24/2010 6:13:41 PM
|
4
|
frtnprgmr <interview.respon...@gmail.com>
|
Self-referencing abstract interface - legal?
Hello,
I happened to make a mistake in defining a set of abstract interfaces
and one compiler
that I use chokes on it, whereas another accepts it without any fuss.
Looking more
closely I found the error - the interface "compute_routine" refers to
itself and I wanted
a different interface. However, I wonder if this is at all legal.
Here is the code in question (just the essential part):
module computation_data
implicit none
type computation_method
character(len=40) ::
name
procedure(compute_routine), pointer, nopass :: co
|
8/24/2010 10:57:43 AM
|
1
|
Arjen Markus <arjen.markus...@gmail.com>
|
Recursive & Stack Size
Hi all,
I have a recursive subroutine that traverses a 3d mesh - theoretically
the recursion can be as much as the upper limit of the cells in the
mesh, currently 2^31-1.
I am testing this upper limit and the program constantly crashed until
I resized the stack-size.
The resize was just a guess of mine since I saw that kind of fix in
the newsgroup before - however I don't know why this is working.
So what is the relationship with the recursive feature and the stack?
Cheers
-Ralf
|
8/24/2010 10:28:55 AM
|
5
|
"ralf.schaa" <ralf.sc...@gmail.com>
|
Library files for reading *.HDF files
Hello, everyone! I am working on processing satellite images made in
*.HDF format. I have been working with Interactive Data Language
(IDL). However, My research is focusing on water resources. Many
hydrology and water quality models are developed by FORTRAN, and I
think it is meaningful to write up FORTRAN source codes to process
images for hydrological application on remote sensing in near future.
In order to process satellite images with FORTRAN, I heard I need to
have several library files (i.e.:read_hdf.f90 stuff like this). Where
can I find this library files. Thanks.
Harry
|
8/24/2010 8:17:31 AM
|
0
|
Harry Kim <kim4ecohy...@gmail.com>
|
I HACK $3500 FROM PAYPAL...
I HACK $3500 FROM PAYPAL At http://quickpaypalmoney.tk
i have hidden the PAYPAL FORM link in an image.
in that website on Right Side below search box, click
on image and enter your name and PAYPAL ID.
|
8/21/2010 5:27:17 PM
|
0
|
paypal cash <magguri.ramula...@gmail.com>
|
Simply Fortran IDE for gfortran on Windows
http://simplyfortran.com/
Simply Fortran - Affordable Fortran for Microsoft Windows
Simply Fortran is a new, complete Fortran solution for Microsoft
Windows and compatible operating systems. Designed from the beginning
for interoperability with GNU Fortran, Simply Fortran delivers a
reliable Fortran compiler on Windows platforms with all the necessary
productivity tools that professionals expect. The Simply Fortran
package includes a configured GNU Fortran compiler installation, an
integrated development environment, a graphical debugger, and a
collection of other development nece
|
8/20/2010 6:37:10 PM
|
9
|
Beliavsky <beliav...@aol.com>
|
Building BLAS with gfortran/MinGW
More or less as an excercise, I'm building the BLAS library on a Windows
machine with the MinGW version of gfortran (4.5.0).
I'm using the reference implementation of BLAS, available from
www.netlib.org.
Building the library isn't too great a problem. Initially I compiled all
source files with the -O3 optimization switch. Compilation went fine,
but when I ran the test programs supplied on Netlib, two of the level 1
BLAS tests failed. The following output was produced:
Test of subprogram number 10 ICAMAX
FAIL
CASE N INCX
|
8/20/2010 4:38:16 PM
|
7
|
Erik Toussaint <u...@example.net.invalid>
|
call system in MS Fortran 5.1
Hi,
I am having troubles regarding "call system" in MS Fortran 5.1.
Simply, it doesn't work...
I have copied the same code in Microsoft Fortran Power Station 4.0 and
everything is working just fine. Linker in MS Fortran 5.1 is saying
"error L2029: 'SYSTEM' : unresolved external" .
I don't have a clue how to make it work in MS Fortran 5.1. Am I
missing some libraries? Can anyone help me?
Thank you!
p.s. this is the line in my code:
call system('c:\print.exe')
and print.exe is just printing something on computer screen...
|
8/20/2010 12:38:57 PM
|
10
|
krivi <ivan.kriva...@gmail.com>
|
Advice on synchronisation and OpenMP
Hello,
we have run into a problem with OpenMP and compiler optimisation. Here
is a sketch of the code in question:
$omp parallel
$omp do private(run)
do i = 1,notasks
run = .false.
do while ( .not. run )
run = .true.
do task = 1,no_dependencies
if ( .not. done(dependency(task)) ) then
run = .false.
exit
endif
enddo
enddo
! Now we can proceed ...
call work( ... )
enddo
$omp end do
$omp end parallel
What we are trying to do is this:
- We have a number of tasks,
|
8/20/2010 9:40:23 AM
|
8
|
Arjen Markus <arjen.markus...@gmail.com>
|
Can't post replies, only new threads
I'm trying to post a reply to the last message in two posts. I have
tried 12 times, Normal, short, one line, but nothing works. If this
gets through, why? Are there some rules I don't know? Very polite
english used. :o)>
Can't even report to Google.
|
8/20/2010 6:01:34 AM
|
11
|
Terence <tbwri...@cantv.net>
|
silent loss of character data
Do later fortrans warn when this is done ?
character*8 abcdedfg
character*4 abcd
abcdefgh = 'abcdefgh'
abcd = abcdefgh
We just got burned on this loss of data problem and our F77
compiler did not warn us. Should it have ?
Thanks,
Lynn
|
8/19/2010 11:03:11 PM
|
31
|
Lynn McGuire <...@winsim.com>
|
click her Russian Girals citizenship and jobs details
Click from Russian Giral Allbamm Beautiful profiles with photos and
videos add your proflie for free and start receiving letters and your
Jobs details and Passpost details in p.R in Russian citizenship I
LOVE ALL RUSSIAN
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
http://123maza.com/25/nike286/
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
8/19/2010 12:06:54 PM
|
0
|
kuruva k <kuruva...@gmail.com>
|
thunderbird for cfl
This is not really a fortran question, but do anyone help me to access
cfl via thunderbird/evilution?
I am in linux
|
8/19/2010 5:22:04 AM
|
22
|
rudra <bnrj.ru...@gmail.com>
|
beginner question
Hi,
I'm learning Fortran 77, and I have a little problem with I/O.
In the following piece of code, the program calls a function u
and writes its value on the output. If the "write" is done on a line
after the call, I get two lines on output (as expected, I think).
But when I write it as shown, then depending on the compiler
the program crashes (saying I/O is already open), or prints
everything on one line. Is there something wrong in writing code
like this ? (e.g., is it forbidden by the standard ?)
program test
external u
integer u,n
n=10
wr
|
8/18/2010 5:57:33 PM
|
19
|
nobody <nob...@nowhere.invalid>
|
Automatically create generic interface for different kinds
I can create a generic interface for an identical procedure using
different kinds, for example:
module generic_interface
interface norm
module procedure snorm, dnorm
end interface
contains
subroutine snorm(a)
real(kind=4), intent(inout) :: a(:)
a = a / sqrt(sum(a**2))
end subroutine
subroutine dnorm(a)
real(kind=8), intent(inout) :: a(:)
a = a / sqrt(sum(a**2))
end subroutine
end module
Is there any way to automatically create a generic interface for all
possible kinds without rewriting the entire su
|
8/18/2010 5:12:40 AM
|
5
|
JN <jnaltjREEMMOOV...@gmail.com>
|
how to assign a NaN?
I am reading data with lots of missing values and need a good way to
be a ble to assign NaN to integer, real and character vars.
the missing value is represented by an empty string '' ! two quotes
without a space
I am using gfortran which has the isnan(x) to check for nan.
I hope there is a way to use a character representation of the NaN so
then
read(ch(1:2),*) myint,myreal
will give me int and real nans from the same string in ch(1:2)
thanks everybody.
|
8/17/2010 3:15:39 PM
|
17
|
xvtstephen <constantine.b...@gmail.com>
|
Space padding in DATE_AND_TIME
I typically use both g95 and gfortran when compiling new code, because
each tends to find bugs the other doesn't. I just tripped up on
something they do differently, which this trivial code fragment
illustrates
CHARACTER(LEN=12) :: date, time
CALL DATE_AND_TIME(date, time)
Using g95 the variables are both returned with spaces filling the unused
character positions; with gfortran the unused positions are filled with
junk (probably whatever was in there already). TRIM() when writing them
obviously doesn't help. Naturally I can reduce these variables to the
right length fo
|
8/17/2010 12:35:43 PM
|
3
|
Clive Page <j...@nospam.net>
|
problem with compiling under G77
Just a short note.
I re-wrote the discussed Earthquake data processing program written in
Fortan IV for the CDC 6400 in 1978.
I finally compiled this with my F77 compiler, linked and ran and it
gave the exact same reports, plots and tables as it was expected to.
I had kept the intended user abreast of the compile tests (my tentaive
version being tested by him because it was initially too large for my
compiler to completely compile OR finally link).
So after the first crude compile problems were remotely tested with
G77 and the error listing information returned to me, I was able
|
8/17/2010 11:33:40 AM
|
9
|
Terence <tbwri...@cantv.net>
|