Hi,
In this forum I once saw a way to pass a function as an argument to another function or subroutine:
http://www.tek-tips.com/viewthread.cfm?qid=1572869
Would it be possible to pass a function as an argument wherein the amount of functions that you pass as an argument is variable?
Thanks...
Hi,
Under Windows XP I made a little program to change words in huge text files (in fact three files of 1Gb, 1.8Gb and 7Gb) as normal text editors refuse to open these huge text files.
To do so, without an editor, I
- 1 - Open the input textfile
- 2 - Read one line only (so the program uses...
Hi,
I installed: http://users.humboldt.edu/finneyb/gfortran-windows-20121210.exe Link (gcc-4.8.0)
Thinking that I was updating my compiler, however compiling I get the error:
Warning: Nonexistent include directory
Uninstalling it and reinstalling my old "gfortran-windows.exe" Version 3, 29...
Hi,
I took an executable, generated by gfortran to another computer (both are windows XP) and got the following error:
libgcc-s-dw2-1.dll missing
The computer where the exe came from had gfortran version 4.7.0:
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=c:/archivos de...
Hi,
I need to compute a series of factorials for high numbers, however, for very high numbers, normal factorials easily break down.
Let me firts post my code
PROGRAM FactorialTest
IMPLICIT NONE
REAL :: Func1,Func2
WRITE(*,*)Func1(10,5),Func2(10,5)
WRITE(*,*)Func1(20,10),Func2(20,10)
END...
Hi,
Using gfortran, if I have a code like
PROGRAM Test
IMPLICIT NONE
REAL :: y,MyFunc
y=MyFunc(2.)
WRITE(*,*)y
END PROGRAM Test
REAL FUNCTION MyFunc(x)
REAL, INTENT(IN) :: x
MyFunc=x**2
END FUNCTION MyFun
that works and another one like
PROGRAM Test
IMPLICIT NONE
REAL :: MyFunc...
Hi,
I changed from gfortran 4.6 to gfortran 4.7 and the size of my executable reduced to one third when compiling with 4.7 with respect to 4.6
I suppose this may be because the default debug settings changed. Before I used strip.exe to reduce the size of my .exe file (see...
Hi,
I used the following procedure to get some screen feedback.
SUBROUTINE StartEndInfo(Line,Sort)
IMPLICIT NONE
CHARACTER(LEN=*), INTENT(IN) :: Line
CHARACTER(LEN=*), INTENT(IN) :: Sort
CHARACTER(LEN=60) :: StartLine
CHARACTER(LEN=20) :: EndLine
IF(TRIM(Sort)=='Start')THEN...
Hi,
Imagine that I've got a SUBROUTINE with some local subroutines under a CONTAINS statement, like:
SUBROUTINE GlobalSub
IMPLICIT NONE
INTEGER :: i
i=1
CONTAINS
SUBROUTINE LocalSub
IMPLICIT NONE
INTEGER :: i
DO i=1,10,1
WRITE(*,*)'the global variable i shouldn't change...
Hi,
I got an error that ehm... ...changes its location in the code.
The behaviour is different
EITHER
The program brakes down and windows says "yourexe.exe did something that's not allowed, send a report?"
OR
The program just stops, as if it ended somewhere in the middle and it returns...
Imagine that I have got two modules
Module 1 in which I use a part of Module 2 and Module 2 in which I use a part of Module 1.
I can't compile, neither module1 nor module2, because the compiler will tell me that it misses the compiled version of the other module that it needs.
What is the...
Ok, another million dollar question, I don't remember whether I asked this already once, maybe I did, if so I'm sorry, but I couldn't find the thread back.
Is there hardware that can be programmed in fortran. I sometimes look at websites with robotics etc. and all this stuff is programmed...
Hi,
During the coffee, someone asked me why I program in fortran, as I'm the only one in the whole company who's using fortran.
I answered that in my discipline (aerodynamics) fortran is the most used language and that, as far as I know, people in physics also still use it.
Later on, I...
Hi,
I'v got some strange unexpected behaviour of MATMUL in F90, which seems to be compiler independent, so I think I didn't get the point of how MATMUL works
I got:
PROGRAM TestMatMul
IMPLICIT NONE
REAL, DIMENSION(4,4) :: A
REAL, DIMENSION(4) :: x,y...
Hi,
Does anyone know what the option
-ffpe-trap=precision
does in gfortran
If I read 4 real values given in a text file like "1. 2. 3. 4."
and compile with the option -ffpe-trap=precision, the program breaks down, supposedly because it's losing precision, but ehhh..., losing precision when...
Hi,
Building (and compiling) an executable in gfortran using the options:
-Wall
-O3
-fbounds-check
It happened to me that the executable seemed to have fortran code information included, which is not always desired.
Once running the executable, the program broke down on some insignificant...
Hi,
I've got a question about the byte amount of the array indices themselves.
Imagine that I define:
INTEGER, PARAMETER :: I8B=SELECTED_INT_KIND(18)
! And
INTEGER(KIND=I8B), PARAMETER :: mx4b=2**32
INTEGER(KIND=I8B), DIMENSION(mx4b) :: MyArray
Now, MyArray is an array of integers, each of...
Does anyone know whether unit 6 for writing files is reserved in gfortran for writing to the screen?
I am writing to file unit 6 and get stuff from write(*,*) in my text file :-(
After not having found anything in the code, I changed the unit to UNIT=7 and the problem was gone.
Hi,
I got a simple half a page code, just to convert some file formats.
If I compile this with microsoft developer's studio I get around 122kB, while if I compile the same code with gfortran I get an executable of 651kB, more than 5 times as big!
Furthermore, the executable of gfortran is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.