Next: , Up: Wide_Text_IO

10.6.1 Stream Pointer Positioning

Ada.Wide_Text_IO is similar to Ada.Text_IO in its handling of stream pointer positioning (see Text_IO). There is one additional case:

If Ada.Wide_Text_IO.Look_Ahead reads a character outside the normal lower ASCII set (i.e. a character in the range:

     Wide_Character'Val (16#0080#) .. Wide_Character'Val (16#FFFF#)

then although the logical position of the file pointer is unchanged by the Look_Ahead call, the stream is physically positioned past the wide character sequence. Again this is to avoid the need for buffering or backup, and all Wide_Text_IO routines check the internal indication that this situation has occurred so that this is not visible to a normal program using Wide_Text_IO. However, this discrepancy can be observed if the wide text file shares a stream with another file.