View previous topic :: View next topic |
Author |
Message |
stenlou
Joined: 24 Jun 2008 Posts: 30 Location: Germany and Denmark
|
Posted: Thu Mar 21, 2013 3:46 pm Post subject: fortran 77 code |
|
|
Dear Support
I am converting some old F77 code (written on Vax computer, so it is old). When compiling the code I get an error with the following functions:
JIDINT
COSD
RAN
Can you help 'translate' these to F95 and is there somewhere a reference manual for F77 (and the F95 equivalent
regards
Sten Lou |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Thu Mar 21, 2013 4:20 pm Post subject: |
|
|
Do you have any idea what these functions do? |
|
Back to top |
|
 |
brucebowler Guest
|
Posted: Thu Mar 21, 2013 6:01 pm Post subject: |
|
|
Google is your friend...
35 seconds of time reveals
JIDINT rounds a real *8 toward 0, returning an integer*4 result
COSD is the cosine function with the argument in degrees, not radians
RAN is probably some form of random number generator (based solely on the name). I'll let someone else google it for confirmation.
Bruce |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Fri Mar 22, 2013 11:41 am Post subject: |
|
|
For a concise guide to Fortran 77 consider: http://www.star.le.ac.uk/~cgp/prof77.html
Googling will show you many documents relating to migrating to Fortran-90 or 95, fewer to the even later standard - although a lot of the latter is not yet in FTN95. Opinions vary as to the usefulness of much in the later standards - old hobby programmers like me think most of it is pointless, talented computer scientists think most of it is vital - but one thing is clear: don't try to convert 77 to 90/95 until the 77 program works, or you will get in a real mess!
Books (made of paper) on Fortran can be obtained from a variety of internet sources.
Many compilers offered extensive libraries of functions. The earlier versions of FTN95 (e.g. FTN77) had one of the largest. Many of the functions still work. They are documented in the support section of the Silverfrost website as a downloadable manual. The Fortran 77 standard has fewer functions than later standards, and occasionally, the compiler-dependent functions have been replaced by standard functions. Most have not.
Eddie |
|
Back to top |
|
 |
mecej4
Joined: 31 Oct 2006 Posts: 1899
|
Posted: Fri Mar 22, 2013 2:47 pm Post subject: Re: fortran 77 code |
|
|
stenlou wrote: | Dear Support
I am converting some old F77 code (written on Vax computer, so it is old). When compiling the code I get an error with the following functions:
JIDINT
COSD
RAN
Can you help 'translate' these to F95 and is there somewhere a reference manual for F77 (and the F95 equivalent
regards
Sten Lou |
The VAX Fortran Reference Manual http://h30266.www3.hp.com/odl/vax/progtool/fortnv66/olrm.htm contains the information you need.
See, in particular, the descriptions of the intrinsic functions: http://h30266.www3.hp.com/odl/vax/progtool/fortnv66/olrm0403.htm#numeric_intrinfuncs
Once you ascertain the meaning of each function, you can read the Silverfrost manual to find a one-for-one replacement or code a substitute function yourself. |
|
Back to top |
|
 |
|