A.37.1 library(pure_input): Pure Input from files and streams
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(pio): Pure I/O
          • library(pure_input): Pure Input from files and streams
            • phrase_from_file/2
            • phrase_from_file/3
            • phrase_from_stream/2
            • phrase_from_stream/3
            • syntax_error//1
            • lazy_list_location//1
            • lazy_list_character_count//1
            • stream_to_lazy_codes/2
            • stream_to_lazy_chars/2
            • stream_to_lazy_list/2
    • Packages
Availability::- use_module(library(pure_input)).(can be autoloaded)
Source[det]stream_to_lazy_codes(+Stream, -List)
[det]stream_to_lazy_chars(+Stream, -List)
[det]stream_to_lazy_list(+Stream, -List)
Create a lazy list representing the character codes (chars) in Stream. List is a partial list ending in an attributed variable. Unifying this variable reads the next block of data. The block is stored with the attribute value such that there is no need to re-read it.
deprecated
stream_to_lazy_list/2 is a backward compatibility alias for stream_to_lazy_codes/2.
Compatibility
Unlike the previous version of this predicate this version does not require a repositionable stream. It does require a buffer size of at least the maximum number of bytes of a multi-byte sequence (6).