Next: , Previous: Pragma Static_Elaboration_Desired,
Up: Implementation Defined Pragmas  Pragma Stream_Convert
pragma Stream_Convert (        [Entity =>] type_LOCAL_NAME,
[Read   =>] function_NAME,        [Write  =>] function_NAME);
This pragma provides an efficient way of providing user-defined
stream attributes. Not only is it simpler to use than specifying
the attributes directly, but more importantly, it allows the
specification to be made in such a way that the predefined unit
Ada.Streams is not loaded unless it is actually needed (i.e.
unless the stream attributes are actually used); the use of the
Stream_Convert pragma adds no overhead at all, unless the stream
attributes are actually used on the designated type.  The first
argument specifies the type for which stream functions are
provided. The second parameter provides a function used to read
values of this type. It must name a function whose argument type
may be any subtype, and whose returned type must be the type
given as the first