Hello! I am trying to understand writing to and reading from streams. The Ada95 LRM 13.13.2 (26) states "If T has discriminants without (!) defaults, S�Output ...". I have no problems writing and reading records without (!) default discriminants (using S'Output and S'Input). But when trying to read a record with (!) a default discriminant (using S'Output and S'Input), there is an exception. What's wrong? I do understand the LRM the following way: For every subtype S of a specific type T, that is, for all (!) types, with and without default discriminants, writing and reading with S'Output and S'Input should function. Any comments? Bernd Ragutt from Munich ---------------------- BerndRagutt@csi.com *** *** Ada95 LRM 13.13.2 Stream-Oriented Attributes ... 25 Unless overridden by an attribute_definition_clause, ... [S'Input, S'Output] ... execute as follows: 26 � If T is an array type, S�Output first writes the bounds, and S�Input first reads the bounds. If T has discriminants without defaults, S�Output first writes the discriminants (using S�Write for each), and S�Input first reads the discriminants (using S�Read for each). 27 � S�Output then calls S�Write to write the value of Item to the stream. S�Input then creates an object (with the bounds or discriminants, if any, taken from the stream), initializes it with S�Read, and returns the value of the object. *** ***