Dan,
This and your other post show code that was written assuming the value of KIND is fixed, which works with most other compilers that share the same KIND assumptions, but not FTN95.
There are two areas that cause problems with this:
- Declaring variables, eg REAL (8) or INTEGER(4) : The easiest portable solution is to use REAL8 and INTEGER4. I forget the long winded standard conforming syntax, which is usually placed in a module, in another file, that later is not listed with the file being compiled.
- Constants, such as 1.2_8, or in the case of FTN95 1.2_3 for real10 constants. The easiest way I know to easily solve this is to use parameter definition of constants. Integer8 and Real*10 always pose problems here. Eg, what is 2_4 ?
Unfortunately this problem was introduced in the late 80's when the standard said the value of KIND was system dependent. Unfortunately FTN95 did not adopt the byte count value and the problem has remained.
My exerience with /alt_kinds was that it did not work with constants. That was a long time ago, so I moved to alternative syntax and haven't tried again.
Again, my recomendation is don't waste your time with the KIND syntax and use the REAL8 and INTEGER4 syntax which always works. (There is probably some compiler out there that objects, but I haven't found it.)
Just thought of a new problem area: With 64-bit there is a transition from INTEGER4 to INTEGER8 for a number of variables being used, relating to memory address and array size (LOC is now INTEGER*8 for the memory address above 2gb, which works well with FTN95)
John