CVS difference for ais/ai-00283.txt

Differences between 1.8 and version 1.9
Log of other versions for file ais/ai-00283.txt

--- ais/ai-00283.txt	2002/06/12 00:36:45	1.8
+++ ais/ai-00283.txt	2003/03/04 04:56:22	1.9
@@ -4,6 +4,8 @@
 !standard A.08.02    (16)
 !standard A.08       (01)
 !class binding interpretation 02-06-10
+!status Amendment 200Y 03-02-18
+!status ARG Approved 5-0-3  03-02-09
 !status work item 02-06-10
 !status received 01-12-14
 !qualifier Clarification
@@ -35,12 +37,19 @@
 Add "stream" to the list of kinds of input-output with Out_File as the default
 parameter in A.8.2(3).
 
-Replace A.8.2(28) by:
+Replace A.12.2(28) by:
 
 The subprograms given in subclause A.8.2 for the control of external files
-are available for stream files. The subprogram End_of_File has the same effect
-as the corresponding subprogram given in subclause A.8.3 for sequential
-input-output.
+(Create, Open, Close, Delete, Reset, Mode, Name, Form, and Is_Open) are
+available for stream files.
+
+The End_of_File function:
+   * Propagates Mode_Error if the mode of the file is not In_File;
+   * If positioning is supported for the given external file, the function
+     returns True if the current index exceeds the size of the external file;
+     otherwise it returns False;
+   * Otherwise, the function returns True if no more elements can be read from
+     the given file; otherwise it returns False.
 
 !discussion
 
@@ -51,7 +60,7 @@
 However, truncating on Open means that all of the data in the file is discarded.
 If the application opens a stream file, positions it, writes a few items,
 positions it to the end, and closes it, all of the data not written by this
-set of operations should remain intact. Thus, the behavior of most compilers
+set of operations should remain intact. Thus, the behavior of these compilers
 is incorrect.
 
 We considered requiring truncation as described in the RM. However, this
@@ -75,6 +84,12 @@
 describe the default mode for Create for stream files. Otherwise, no changes
 to A.8.2 are necessary.
 
+Finally, we define the behavior of End_of_File directly in A.12.1. Since stream
+files can be positioned, the equivalence given in the RM means that the
+behavior of End_of_File is unspecified if the file has been positioned after
+reaching the end, or if it positioned beyond the end. Clearly, that is not
+intended.
+
 !corrigendum A.8(01)
 
 @drepl
@@ -119,9 +134,15 @@
 @dby
 The subprograms given in subclause A.8.2 for the control of external files
 (Create, Open, Close, Delete, Reset, Mode, Name, Form, and Is_Open) are
-available for stream files. The subprogram End_of_File has the same effect
-as the corresponding subprogram given in subclause A.8.3 for sequential
-input-output.
+available for stream files.
+
+The End_of_File function:
+@xbullet<Propagates Mode_Error if the mode of the file is not In_File;>
+@xbullet<If positioning is supported for the given external file, the function
+returns True if the current index exceeds the size of the external file;
+otherwise it returns False;>
+@xbullet<Otherwise, the function returns True if no more elements can be read from
+the given file; otherwise it returns False.>
 
 !ACATS test
 

Questions? Ask the ACAA Technical Agent