fortran77

Fortran: line to long / append line - but with text at the end?

I have a line of Fortran code, which includes some text. I'm changing the text, which makes the code line too long for Fortran, so I split it over two lines using 'a'. Was: IF (MYVAR .EQ. 1) THEN WRITE(iott,'(A) (A)') 'ABC=', SOMEVAR Changed to: IF (MYVAR .EQ. 1) THEN WRITE(iott,'(A) (A)') 'ABC DEF GHI JK a ' // 'L=', S...

Make double-precision default in g77, Fortran compiler

Is there an analog of the "-fdefault-real-8" gfortran (the GNU Fortran 95 compiler) option in g77 (the GNU Fortran 77 compiler)? This option sets the default real type to an 8-byte wide type. I currently have code where single-precision arithmetic is limiting my accuracy, and so I need double-precision. (It's not just intermediate val...

Can Pro*Fortran connect to Oracle 10g on windows?

Hi, has anyone successfully compiled a pro*fortran program on windows that connects to Oracle 10g? I can only seem to find information that suggests that pre-compilation of embedded sql is possible against Oracle 8i and earlier. If you have done this please can you post any links you have for compilers, oracle downloads/articles etc a...

How can I convert code from Fortran77 to Visual Fortran?

I need to convert a code from Fortran77 to Compaq Visual Fortran. Is it possible? If "yes": is it also possible to save the results in a form that can be imported in EXCEL 2003? ...

how can I save results of a Fortran77 code into a text file?

I want to save results in a text file. How can I do that? Write command? ...

Is there a command in Fortran77 or later that decompresses a file?

I have a file that is compressed and I want to decompress it. Do you know if there is a command or do I need to follow another path? ...

How to decompress a file in fortran77?

I have a compressed file. Let's ignore the tar command because I'm not sure it is compressed with that. All I know is that it is compressed in fortran77 and that is what I should use to decompress it. How can I do it? Is decompression a one way road or do I need a certain header file that will lead (direct) the decompression? It's not a...

Array of Strings in Fortran 77

I've a question about Fortran 77 and I've not been able to find a solution. I'm trying to store an array of strings defined as the following: character matname(255)*255 Wich is an array of 255 strings of length 255. Later I read the list of names from a file and I set the content of the array like this: matname(matcount) = mname ...

Is Fortran 77 POSIX conformant? - Write binary files

I'm trying to write binary data files from fortran, but I find the regular file interfaces very limiting, I wonder if Fortran has POSIX compilant functions. I found this standard: IEEE 1003.9-1992, but I don't know it if is fully supported by most common compilers (or if I have to activate any flags). I can't find any practical informat...

Generating random number in a given range in Fortran 77

I am a beginner trying to do some engineering experiments using fortran 77. I am using Force 2.0 compiler and editor. I have the following queries: How can I generate a random number between a specified range, e.g. if I need to generate a single random number between 3.0 and 10.0, how can I do that? How can I use the data from a text f...

I would like to know what the following FORTRAN 77 code does.

In a .f file there is code that does this: real Bob, avar ... avar = Bob( 8.3 ) ... Bob appears to be a function but it is declared at the beginning of the file as a real. Then there is a .d file that has a reference to Bob. Also I know avar holds a value that appears is interpolated, The problem is the interpolation is not always r...

Linking errors from C language in fortran lib.

Hi, I am porting the application with old fortran compiler and old visual studio(VC5) to new fortran compiler 11 and visual studio 2005. Application contains both 'C' and fortran code. I am compiling the fortran code and creating library called server_lib.lib(library is createing with some warnings) and linking to the 'C' code. while l...

Where can I get the files to install f2c on redhat linux?

I am looking for an rpm or simple install instructions for getting f2c to work on my redhat linux os. I am new to linux and it is difficult finding something like this on google. (The goal is to use f2c to convert a simple fortran77 file to c, then compile) Does anybody have any suggestions? ...

returning real values from fortran77 dll to c#

Can somebody please point out what I'm doing wrong here? FORTRAN 77 dll code *$pragma aux DON "DON" export parm(value*8,value*8) SUBROUTINE DON(DAA,DBB,DCC) REAL*8, DAA,DBB,DCC DBB=DAA+1 DCC=DBB+1 RETURN END C# code using System; using System.Collections.Generic; using System.Linq; using S...

Opaque pointers in F77

I have a project that is half in C and half in Fortran 77. [No, not Fortran 90 or 03, Fortran 77.] The code would be much cleaner if I could pass pointers generated on the C side back to Fortran, which would then pass them back as necessary for handling in other C functions. As it is, the C code is filled with global variables that shoul...

Abstract Data Types in Fortran 77 (Fortran-II)?

I'm attempting to work in Fotran 77, and I've found the need for a tree based data structure. Aside from implementing a tree with an array, is there any way to build a tree with pointer nodes to other nodes, as per a standard implementation in most languages? The documentation for this beast is scarce, and there doesn't appear to be any...

Why define PI = 4*ATAN(1)

What is the motivation for defining PI as PI=4.D0*DATAN(1.D0) within a Fortran 77 code? I understand how it works, but, what is the reasoning? ...

Fortran77 compiler treatment of PI=4.D0*DATAN(1.D0)

When using the following to compute PI in fortran77, will the compiler evaluate this value or will it be evaluated at run time? PI=4.D0*DATAN(1.D0) ...

Porting sun studio compatible fortran 77 to gcc: format specifier in READ, FORMAT

I have some old fortran 77 I'm trying to port to gcc on Windows. I'm using gfortran 4.4. The statement uses READ(FOO, '(F)' , ERR=BAR) BAZ and gcc is complaining about F. From what I've seen it looks like F needs a size associated with it. There are also FORMAT statements which use a similar construct. What is the proper way to port t...

Linking LAPACK/BLAS libraries

Background: I am working on a project written in a mix of C and Fortran 77 and now need to link the LAPACK/BLAS libraries to the project (all in a Linux environment). The LAPACK in question is version 3.2.1 (including BLAS) from netlib.org. The libraries were compiled using the top level Makefile (make lapacklib and make blaslib). Probl...