
at(+Stream, ?Pointer)

   Succeeds if Pointer is the pointer position of the stream Stream.



Arguments
   +Stream             Integer (stream number) or Atom (reserved or user-defined                symbolic stream name).
   ?Pointer            Integer or variable.

Type
   Stream I/O

Description
   Unifies Pointer with the file position of the file specified by Stream.


   Stream can be a logical stream name or a physical stream number.




Resatisfiable
      No.

Fail Conditions
      Fails if Pointer is not the pointer position of the stream Stream.



Exceptions
     4 --- Stream is not instantiated.
     5 --- Pointer is instantiated to a non-integer.
     5 --- Stream is instantiated to neither an integer nor an atom.
   192 --- Stream is an illegal stream mode.

Examples
   
Success:
      [eclipse]: open(file1,write,s), at(s, P1),
      > write(s, 1234567890), at(s, P2), close(s).
      P1 = 0
      P2 = 10
      yes.
      [eclipse]: open(file1,update,s), at(s, P1), read(s, T),
      > at(s, P2), close(s).
      P1 = 0
      T = 1234567890
      P2 = 10
      yes.

Error:
      at(Stream, 4).      (Error 4).
      at("3", Pointer).   (Error 5).
      at(7, 4.3).         (Error 5).





See Also
   at_eof / 1, seek / 2
