Quoted from JohnCampbell
'Array dimensions need to be limited by (-maxint to maxint) where maxint is MAXINT(0) the largest default integer. '
What are you saying ?
The default integer model (32 bit signed integers) has maxint equal to 2**31-1 = 2147483647. In an array or array section expression, the subscripts must be between -2147483647 and 2147483647 (inclusive), so the largest array you can declare is:
BIG_ARRAY(-2147483647:2147483647)
If you don't like non-positive indices and want the first index to be 1, the largest array is
BIG_ARRAY(2147483647)
Quoted from JohnCampbell
The whole point of /64, ie 64 bit addressing is that arrays will be larger than 2^31. I have a number of examples where this is the case.
With FTN95 it isn't possible to create an array in with any one dimension bigger than 2^31-1 unless you use non-default integers for the dimensions. To do this using /64 the default integer model would have to change to allow larger integers (e.g. to 64 bit integers, maxint = 2**63-1). However, currently the compiler doesn't do this.
I would like to see an example, just a code snippet were such arrays get created.
Quoted from JohnCampbell
The point I was trying to make about LOC as default integer is that even in 32 bit, it did not work for /3GB.
Yes, I understand that. LOC is about the concept of address, so it is helpful for it to be coded as a 64 bit integer on 64 bit machines. LOC is an extension and I have no problem with how it works.
Quoted from JohnCampbell
If I code 'SIZE (profile)' I expect to get an answer that is useable. It is a generic intrinsic. I actually need a useable answer and to have an I*8 returned in /64 is a necessary outcome. If at this stage of development FTN95 /64 returned a default integer value, it would be useless.
But SIZE isn't supposed to be generic. The kind of the integer returned by SIZE has nothing to do with the kind of the data in the array.
SIZE is an 'array inquiry function'. It needs to return values which are compatible with the other 'array inquiry functions' UBOUND and LBOUND. However, these don't return a 64 bit value when /64 is used (I assume this is an oversight). It is necessary to maintain the identity SIZE=UBOUND - LBOUND + 1 and to allow UBOUND < LBOUND and SIZE=0.
If the compiler ensured that use of /64 also implied /DEF_INT=4 then SIZE would return a 64 bit value, which would be ANSI compliant and do what you want.
However, I suspect you would not want to change the default integers everywhere, and a much cleaner solution would be to use the Fortran 2003 mechanism of having KIND as an argument.
Here is a simple example of how this works (note the array is just 1 bigger than allowed using default integers, so integers with a larger range need to be used in the declaration of the array). Of course you should use parameters for the kind values, which I haven't done here.
program main
real a(2147483648_4)
print *, 'Size = ', size(a, kind=4)
end
Quoted from JohnCampbell
There are a number of non-standard features in FTN95, including business formatting, the use of commas in data and transparent I/O. I don't think many would ask for a refund because of the way FTN95 provides stream I/O
The point I was making is that Silverfrost won't want to make claims that are not true. If they decide not to fix-up this issue in /64 bit mode, I would expect them to say something like 'ANSI compatible 32 bit compiler, but not in 64 bit' somewhere on the web site.
Let's not forget that the 64 bit compiler is very new. Silverfrost deserve much credit for this development, which in time will prove very useful. There are a number