I would also suggest that the example use IOMSG= and print the returned message now that that is widely available. It will (hopefully) produce a clear message that an attempt was made to read a non-existent record. Another thing not mentioned is youcan have your
code check the size of a unit:that I go and look. My own build scripts and fpm(1) specify it so I had forgotten.
The number of bits in a file storage unit is given by the constant FILE_STORAGE_SIZE (16.10.2.11) defined
in the intrinsic module ISO_FORTRAN_ENV. It is recommended that the file storage unit be an 8-bit octet
where this choice is practical.
so you can, in the case of ifort(1), warn if it is compiled with a FILE_STORAGE_SIZE of 32 instead of 8. I thought ifort(1) no longer used longwords as the unit for RECL by default, too. I guess that is not the case unless formatted I/O is used, now
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 159 |
Nodes: | 16 (0 / 16) |
Uptime: | 99:49:41 |
Calls: | 3,209 |
Files: | 10,563 |
Messages: | 3,009,979 |