}
+/* Transfer function for IOLENGTH. It doesn't actually do any
+ data transfer, it just updates the length counter. */
+
+static void
+iolength_transfer (bt type, void *dest, int len)
+{
+ if (ioparm.iolength != NULL)
+ *ioparm.iolength += len;
+}
+
+
+/* Initialize the IOLENGTH data transfer. This function is in essence
+ a very much simplified version of data_transfer_init(), because it
+ doesn't have to deal with units at all. */
+
+static void
+iolength_transfer_init (void)
+{
+
+ if (ioparm.iolength != NULL)
+ *ioparm.iolength = 0;
+
+ g.item_count = 0;
+
+ /* Set up the subroutine that will handle the transfers. */
+
+ transfer = iolength_transfer;
+
+}
+
+
+/* Library entry point for the IOLENGTH form of the INQUIRE
+ statement. The IOLENGTH form requires no I/O to be performed, but
+ it must still be a runtime library call so that we can determine
+ the iolength for dynamic arrays and such. */
+
+void
+st_iolength (void)
+{
+ library_start ();
+
+ iolength_transfer_init ();
+}
+
+void
+st_iolength_done (void)
+{
+ library_end ();
+}
+
+
/* The READ statement */
void