
compiled_stream(?Stream)

   Succeeds if the I/O stream currently being compiled is Stream.



Arguments
   ?Stream             Atom, Integer or variable.

Type
   Predicate Database and Compiler

Description
   Used to find the stream that is currently being compiled.
   compiled_stream/1 is meaningful mainly in queries inside a compiled
   file, or in event handlers for compilation events.




Resatisfiable
      No.

Fail Conditions
      Fails if no compilation from a stream is currently active.



Exceptions
     5 --- Stream is instantiated, but not to an atom or integer.

Examples
   
    [eclipse]: [user].
     a.
     :- compiled_stream(S), get_stream_info(S, name, File),
        printf("Compiling stream %d, file %s\n", [S, File]).
    Compiling stream 0, file user
    ^D
     user       compiled traceable 28 bytes in 0.00 seconds

    yes.
    [eclipse]: exec('cat a.pl', []).
    a.
    :- compiled_stream(S), get_stream_info(S, name, File),
       printf("Compiling stream %d, file %s\n", [S, File]).

    yes.
    [eclipse]: [a].
    Compiling stream 5, file /home/joe/a.pl
    a.pl       compiled traceable 28 bytes in 0.00 seconds

    yes.





See Also
   compile / 1, compile / 2, compile_stream / 1
