@@ -39,4 +39,11 @@ program inqrecl
if (r /= -2) then
STOP 5
end if
+
+ ! Also inquire by filename for a non-opened unit is considered
+ ! unconnected similar to the first test.
+ inquire(file='unconnectedfile.txt', recl=r)
+ if (r /= -1) then
+ stop 6
+ end if
end program inqrecl
@@ -706,7 +706,9 @@ inquire_via_filename (st_parameter_inquire *iqp)
}
if ((cf & IOPARM_INQUIRE_HAS_RECL_OUT) != 0)
- *iqp->recl_out = 0;
+ /* F2018 (N2137) 12.10.2.26: If there is no connection, recl is
+ assigned the value -1. */
+ *iqp->recl_out = -1;
if ((cf & IOPARM_INQUIRE_HAS_NEXTREC) != 0)
*iqp->nextrec = 0;