Fortran Definition and 876 Threads

  1. K

    Comp Sci Computional Methods Problem with Fortran programming

    Is there anyone familiar with Fortran programming, who can give me some simple ideas or resources how can I strart this project? Many thanks Data Structures - The Permutation Group In this project, the group of permutations on N elements (where N is probably fairly small, perhaps N= 9 or...
  2. M

    Fortran FORTRAN Open Arbitrary number of files in Do Loop

    I have a quick question that I've always wondered exactly how to do but never needed to. Well of course now I do. I have a DO loop that loops an arbitrary number of times. I would like to open a file each time it comes around, using the DO loop iterator as part of the filename. Ideally, it would...
  3. D

    Fortran What is the most optimized way to transpose a matrix in Fortran?

    Hi! I'm working on a programming project(fortran 77). and I need to transpose a big matrix, and for the moment I'm doing it by to do-loops: DO 20 J = 2,NP DO 10 I = 1,J-1 T = P(I,J) P(I,J) = P(J,I) P(J,I) = T 10 CONTINUE 20...
  4. M

    Fortran Loading 2D array files to Fortran variables

    Hi, I have created data files by compiling and running a c++ code. Now I need to open and store the contents of these files in Fortran 77 variables. But I am not able to do this. The read command does not return the values stored in the file. The files are having some 2003 lines and 53...
  5. W

    Fortran Why Doesn't Fortran Recognize Small Numbers?

    We're not talking very small. Is it the compiler? I'm using gfortran. An example would be: f(y)=1E-5*(y**3) For f(40), that should be 0.64. When I compile and execute, however, it displays 0's. If I make the coefficient 1, the result does come out to be correct. I have an old...
  6. J

    Fortran What Could Be Causing Errors in My Fortran Program Compilation?

    Hi there I compile the following Fortran program but it shows more error it output file. can you help me. with Regards, jamshid INCLUDE '(SCOHLP)' INCLUDE '(PAPROP)' * * ******LOGICAL LFIRST ******SAVE LFIRST, ZMIN, DELTAZ ******DATA LFIRST /.TRUE./ * Initialization...
  7. F

    Fortran Fortran: how do you read from a memory-mapped file?

    Hello everyone! I have some binary data (list of integer and float values) stored in a memory-mapped file. I need to read this data. I know how to do this in Delphi and C, but Fortran completely stalled me. So far I managed to open my virtual file (OpenFileMapping) and create a mapview...
  8. B

    Fortran Fortran issue. HEEEEELP? Not a human error, somethings buggy ?

    Fortran issue. HEEEEELP? Not a human error, somethings buggy...? I have no clue why this is acting like this, I'm getting a strange error. I don't believe this is a human error, I've followed the examples perfectly. The picture shows it all. I ran it once trying to use a random function and...
  9. C

    Fortran Help with Fortran Code Using FFTW-3.3alpha1

    Hello, I've been trying for 2 weeks now to write in fortran a MPI program that computes the Fourier transform off a real matrix and then in vers transform using fftw-3.3alpha1. I installed the libray on evry computer availbale at my school and an I was able to compile yet my code. Even if...
  10. K

    Fortran Exploring Effects of Commenting Writes in FORTRAN SDP

    I have a stochastic dynamic program with markov process written in FORTRAN, below. If you comment out the write statement that says "uh, THIS SHOULD MAKE NO DIFFERENCE" and/or some of the other write statements that are just text, no variables being written, you will see a difference in the...
  11. K

    Fortran Formatting Issues in Fortran Compounded Interest Program?

    I'm trying to write a program for compounded interest, but am having trouble with the formattting. Any ideas? This is what I have: program interest_calculations !name, Assignment 5-25, to calculate interest implicit none real :: A !future value of the account real :: r !annual percentage...
  12. W

    Fortran I'm Having a lot of Problems with Fortran (77)

    I'm new to this language, and my programming experience is limited (I've only done Assembly). My issues do not necessarily lie in the coding itself, but in the compiling and building. I'm using Eclipse, on which I installed Photran. The syntax recognition and formatting of the GUI is very...
  13. R

    Fortran (3I3,F9.6) Fortran source code

    what does this mean..i saw this in Fortran source code! (3I3,F9.6) thanks.
  14. P

    How Can I Correctly Use the 'dacos' Function in a Fortran Header File?

    I came across a problem on the project: my project is comprised of tens of fortran files. There is a param.h header file collecting all the parameters that are used by the program and subroutines. but after I add this line: parameter(pi = dacos(-1.0d0)) into the param.h the command "make "...
  15. A

    Learn Fortran for Atomic/Particle Physics Grad Studies

    Alright I'm a first year physics student whose goal is to get a masters or PHD in atomic or particle physics. However I've been talking to a lot of physics grad students and the all mention using Fortran in their research. Now I've gone over my courses and the only programming class I'm required...
  16. F

    Fortran Error 112 /undef when running fortran code

    Hiya. I am able ot compile my program with no errors but when I run it I get the message: Error 112, Reference to undefined variable, array element or function result. I cannot see where I have gone wrong and more frustratingly this code was working, running producing results on the unix...
  17. K

    Fortran Subscripts and Fractions in Fortran 95

    i'm trying to write the equation dB=log_10(P_2/P_1) I just need help writing this equation into Fortran. I know for exponents I use **, but what about subscripts? Also, my inital thought for a fraction is /. Is this correct?
  18. D

    Fortran Fortran: String to Real Conversion

    This has been bugging my (and my program) for a few days now. I'm searching for a way to convert a string (or more properly; a collect of characters) to a Real data type. I'm new to Fortran, but as I understand it there seems to be no intrinsic function to make this easy. I have tried various...
  19. S

    Fortran 90 (need to read in binary data files into arrays)

    Hello, I am currently doing a 3rd year undergrad project on forward radio meteor scatter the problem involves the following: I have over 80Gbs worth of 10 second data blocks of recorded radio input. They are stored as date stamped .bin files in binary format, each of order 1700kb or...
  20. M

    Fortran 64 bit windows fortran compiler

    Hi, I have used Compaq Visual Fortran 6.5 for years. Recently bought a new PC with Intel Core2 Quad Q6600 processor and Windows Vista 64 bit Home Premium OS (yes, likely a mistake on the OS). I wish to use Code I wrote in the past and take advantage of 64bit processor, memory, etc. I...
  21. A

    Fortran Can Fortran Incorporate Variables in Output File Names?

    Hi, I looked around in some forums, but couldn't find a good answer to this problem: my programmes produce several output files. When the programm is finished, I add certain simulation parameters to the file name, so that I see later, to which simulation run this file belongs. (for example...
  22. J

    Fortran Fortran - How to retrieve read near middle or end of large file quickly.

    Hi. I need to be retrieve information far into a file without reading everything before it. Is there a way to do this? Current code is below. Thanks, Jeff Tibbitt !ccccccccccccccccccccccccccccccccccccccc program getcoord integer i real*4 xx(1000), yy(1000), zz(1000) double precision...
  23. M

    Fortran Simulation: spectroscopy with fortran or anything else

    hi friends, I'm going to simulate the spectrum of a specific ion, with constant situation (like: density, temperature and etc). but I don't know what should I do first! thanks for your help :frown:
  24. P

    Fortran Checking programming code: fortran 95

    Hi. Can anyone be kind enough to check what's wrong with my source code? Here's the project: http://www.dur.ac.uk/3h.physics/proj...nsmission.html You can skip the introduction bits. I'm stuck at the last question on Calculation Part I. I did the source code independently and it works...
  25. J

    Fortran How can I test my loudspeaker for sound output in Fortran?

    Hello, i want to produce a sound, for example a simple beep, with fortran. Can anyone help me please? John
  26. B

    Fortran Help with Fortran 77 - File Opening Questions

    Hi, I have some doubts about how to open files in fortran 77. The file must to be inside some particular directory? Sorry about my english.
  27. W

    Fortran Creating Multiple Output Files in Fortran

    Hi guys, I am tryin to get my program to output multiple files with the name of the file dependent on a number of integer variables in the program, any help with this would be greatfully appreciated. Cheers
  28. M

    Fortran Learn Fortran in Linux: Step-by-Step Guide

    Hello, I used to do schoolwork in Fortran (Compaq Windows version). Couple weeks ago I decided to say "good-bye" to Windows and installed Mandriva Linux. But now I'm quiet confused how program work in work. I see that nolonger I don't have beautiful white window to write program text...
  29. R

    Fortran Frustrating fortran .exe problem

    HI, I am using fortran 90 for simulation. I write a subroutine (CALC_PORO_SOL_BANDED )where i called a linear solver LSLRB. I called this CALC_PORO_SOL_BANDED subroutine from another two subroutine in a do loop. It works for 1 subroutine without any error but from another subroutine it works...
  30. F

    Fortran Fortran complex numbers and do loops

    I have a very simple question, but have been unable to find an answer for it. When using fortran 90 can you use a DO loop to calculate a complex number? For example: [code] COMPLEX FUNCTION forwards (tincdum,tstartdum,tenddum,fdum,ydum,idum,wdum&...
  31. N

    Fortran Can I Compile Linux FORTRAN Code on a Windows Compiler?

    Hi, I have a code that was written with a Linux FORTRAN compiler but is 'portable'. does this mean I am able to compile it on a windows compiler?
  32. P

    Fortran Fortran: Integrating Different Functions

    Hi! Im using fortran and am trying to create a integrating program that is able to use different functions. I have written the subroutine that will integrate but would also like it to be able to use different functions determine by user selection. Here is my subroutine: subroutine...
  33. Y

    Fortran Why Does My Fortran 90 Function Cause a Segmentation Fault?

    i have a fortran 90 function invoked: iret = store_data(ncid_bfm,var_ids(n),OCET_SHAPE,NO_BOXES,garray=D3DIAGNOS(i,:)) each time i get to that line i get segmentation fault on the calling unit variables a defined like so: !BOP ! ! !IROUTINE: Store the results ! ! !INTERFACE...
  34. fluidistic

    Fortran 2 questions in one thread : Fortran 90

    Hi, I'm laughing, after having passed more than one hour on a very simple program I could finish it. It does the Euclidean division between 2 numbers that one type. It is very inefficient I agree. I gave up doing it in a more efficient way in order to simplify it (for my brain at least)...
  35. fluidistic

    Fortran Fortran 90 very basic question : else if statement

    Hi there, I've tried all I could in order to complete a very simple and basic program that finds the roots of any quadratic binomial. You have to enter the coefficients a, b and c and it would find the roots. I could do that, but a problem occurred if I typed a=0. Of course if a=0 the...
  36. S

    Which Software is Best for CFD: Fortran vs C

    Can someone pls advise me as to which would be the better software to learn which would help in CFD - Fortran or C or something else? Thanks!
  37. H

    Comp Sci Electrodes on a Grid in Fortran 77

    1. Question Statement: Create a 40 mm by 40 mm two-dimensional grid centered on point (0,0) (grid size 1mm by 1mm so the grid is 41 points by 41 points). On this grid, put four circular electrodes, one centered on each corner, each with radius 15 mm. Fix the electrodes on the upper left and...
  38. S

    Fortran Why Is My Euler Method in Fortran Not Updating Yn Correctly?

    Euler Method in Fortran - HELP! Using Euler method I want to calculate the equation below, deltat=0.3, 10 times. Problem: When n=1, Yn1(1) is calculated right. But, in the following steps it should assume that Yn(2)=Yn1(1) and the program is assuming Yn(2)=0, as well as Yn(3)=0,...and so on...
  39. A

    Fortran Run External File.exe Through Fortran 90 - Answered

    Hi! I'm a MSc student and for the development of my dissertation I need to implement a simple fortran 90 program. I'm aware of the basic features of this language but I can't seem to find how to run an executable file (an external file) through fortran. My question is, how can I make the fortran...
  40. L

    Fortran PROGRAMMING WITH FORTRAN 77 copyright 1995

    I have the book "Schaum's Outline Series Theory & Problems PROGRAMMING WITH FORTRAN 77 copyright 1995", well from the time of this book till today(2008-9) changed a lot in FORTRAN 77 ? If yes, what points mainly ? Well start reading this book , or buy another newer book in the subject ? This...
  41. N

    Fortran Fortran 90: Alternative to flush() for f90 Compiler

    Hi all, I've recently obtained some code in Fortran 90 that was compiled with gfortran. I am compiling with f90 and one of the called statements is not recognised. I have call flush(1) where 1 is the filename that the code is flushing. Since flush is not a part of f90, is there an...
  42. T

    Fortran Solving Fortran Error on Pascal's Triangle Program

    I am trying to write a fortran program to take an integer n and print out the first n rows of Pascal's triangle. The code I have so far: PROGRAM PascalTriangle IMPLICIT NONE INTEGER i, n, j, ktemp, ktemp1, ktemp2, ktemp3, ktemp4, ktemp5 WRITE(6,*), "Enter a positive integer n:> "...
  43. N

    Fortran Fortran 77 & 90/95 on Windows XP

    Hi all, I'm sure this question has been asked before but I couldn't find it. However, I will ask it nevertheless... How does one compile AND run fortran 77 & 90/95 codes on a Windows XP O/S? The fact I am asking this means I am not a computer-whizz so please take this into account when...
  44. O

    What Fortran Software Should Beginners Use for Programming Classes?

    Hi everyone, Currently my friend is taking fortran programming class at his university. The instructor said every student should own any fortran software. As I don’t have much know about it, can anyone recommend me any fortran software for this fortran programming class? Thanks in...
  45. U

    Fortran Fortran compiler specific kind modifier.

    Fortran compiler specific "kind" modifier. I've recently switched over from the SilverFrost (Salford) FTN95 compiler to the open source g95 compliler. So far everything seems very compatible between the two compilers (as in the same source compiles without modification on either compiler)...
  46. M

    Fortran Beginner fortran question - starting with a new slate

    Hi All I am new to fortran and there are things that I believe fortran should do and don't know how to do it - I am using fortran 77. 1- I know how to declare variables, but i do not know how to make sure that i start out with zeros and not use old data that might have been stored by a...
  47. fluidistic

    Fortran Can I create a chess engine using Fortran 90?

    I'm just a very beginner when it comes to program and I have a question. I've read that some (old) chess engines are written in fortran so I know it's possible to create a chess engine using the fortran language. I wanted to know if someone has a link or a file providing the source of a chess...
  48. U

    Fortran Fortran write (or print). How to controll new line or not

    Fortran write (or print). How to controll "new line" or not I haven't touched fortran for about 100 years (and that's only a very slight exaggeration). Recently I had to write a very small amount of code in Fortran 95. I've picked up most aspects pretty quickly but I'm still a bit vague on...
  49. L

    With FORTRAN I may program Microcontrollers ?

    With FORTRAN I may program Microcontrollers ? what else ? Can you give me some edu sites (offer such kits) of using fortran such a way ?
  50. K

    Fortran What Does 10.e6 Mean in FORTRAN?

    Hello, I've a program in FORTRAN which I need to convert to C#, there's an assignment statement like this: FC=10.e6 What exactly does it mean? Is it 10*10^6? or 10.000000? Do you have some tips to convert the FORTRAN program to any modern language (C#, JAVA, C/C++) ? Thank You
Back
Top