Ada Programming/Attributes/'Input

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Description

[edit | edit source]

Reads and returns one value from the Stream argument.

For every subtype S of a specific type T:

S'Input denotes a function with the following specification:

function S'Input (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return T

S'Input reads and returns one value from Stream, using any bounds or discriminants written by a corresponding S'Output to determine how much to read.

Example

[edit | edit source]
SInput (Stream:access Ada.Streams.Root_Stream_TypeClass) return T