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 right.
Bob John 35
-17. -16. -15. -14. -13. -12. -11. -10. -9. -8.
-7. -6. -5. -4. -3. -2. -1. 0. 1. 2.5
3. 4. 5. 6.5 7. 8. 9. 10. 11. 12.
13. 14. 15. 16. 17.
0.001 0.001 0.041 0.098 0.155 0.213 0.27 0.327 0.384 0.441
0.499 0.556 0.613 0.670 0.728 0.785 0.844 0.904 0.965 1.058
1.089 1.152 1.216 1.314 1.347 1.413 1.479 1.543 1.609 1.670
1.733 1.799 1.860 1.925 1.937
This is all legacy code. I did not write it. I am trying to fix it. My question consists of the following:
What is this doing and how? What is a .d file?
I think it is trying to interpolate but I did not think you could do this (in this way) with FORTRAN 77.
Answer
Sorry for the confusion. The answer is the system is using a proprietary macro c to FORTRAN program that does interpolation. This happens in the make file. I found by looking at some obscure documentation . Thanks everyone for their input. Sorry again for the terseness of it. I was not trying to be difficult. It was confusing to me with what I saw as well. It is sometimes difficult working with 30 year old legacy code bought from a different company. I am new to FORTRAN so I thought I was not seeing something I should have been seeing like a language feature I was unfamiliar with. I feel foolish. It did lead me to dig deeper. Lesson learned.
Related Questions
- → I would like to know what the following FORTRAN 77 code does
- → Executing fortran code doesn't work under geany in windows 7
- → What is a good way of mapping arrays in Python?
- → Reload shared Fortran library in Python tests
- → Buffer overflow from print statement in fortran
- → How to read data from external .txt file, store them in arrays, filter and write them in a new file in Fortran 90?
- → EOF handling for reading raw binary files into an array in Fortran
- → GNU FORTRAN OpenACC Accessing an allocatable member of a derived type on device
- → Iterate through a character in C
- → Advantage to use gfortran over gcc
- → Difference in Fortran pointer and Fortran allocatable in calling C_F_POINTER
- → Assigning a Fortran integer value to a malloc-allocated C memory target
- → Fortran and C interoperability: passing char *string as a function's argument to Fortran