Regarding formatted I/O, I don't get the same behavior from these two source code examples:
write(1,* ) (a(ira,kk),kk=1,nca)
The first one does it right, but the second one gives different results.
A is a 2-dimensional array, could be REAL, D.P. or integer.
The row number IRA is specified ahead of time.
Is there any reason why the compiler would give different behaviors ?
I can generate a simple test program if needed.
A simple test program as well as a description or example of the "different behaviors" would be useful.
I recall there was(is) a different thread on the Windows or Linux forum that discusses the same issue. It may have a tracking number.
I don't remember an issue like this. Could it be that you are thinking of one related to use of a zero width in an explicit format causing a side-effect of a later WRITE?
As I remember, the thread related to a statement like:
some2Darray = other2DarrayFirstDimGT1(idx, 1:N)
Where the compiler produced/interpreted the shape of the rhs as being a 1D array
This problem may potentially suffer part of this confusion.
A simple test to confirm this would be to try encapsulating the array slice in ()'s
For list-directed output, the shape of the array would not have any effect. It's just a sequence of elements.
Bill hasn't told us what the different results are. At this point I suggest we wait for a test case and sample output, along with the exact compiler version being used, before speculating further.