Scanf.Scanning(3o) - phpMan

Command: man perldoc info search(apropos)  


Scanf.Scanning(3o)                        OCaml library                        Scanf.Scanning(3o)



NAME
       Scanf.Scanning -  Scanning buffers

Module
       Module   Scanf.Scanning

Documentation
       Module Scanning
        : sig end



       Scanning buffers







       type scanbuf


       The type of scanning buffers. A scanning buffer is the source from which a formatted input
       function gets characters. The scanning buffer holds the current state of the scan, plus  a
       function  to  get  the  next  char  from the input, and a token buffer to store the string
       matched so far.

       Note: a scan may often require to examine one character in  advance;  when  this  ``looka-
       head''  character  does  not  belong  to the token read, it is stored back in the scanning
       buffer and becomes the next character read.




       val stdib : scanbuf

       The scanning buffer reading from stdin .  stdib  is  equivalent  to  Scanning.from_channel
       stdin .

       Note:  when  input  is read interactively from stdin , the newline character that triggers
       the evaluation is incorporated in the input; thus, scanning specifications  must  properly
       skip this character (simply add a '\n' as the last character of the format string).




       val from_string : string -> scanbuf


       Scanning.from_string s returns a scanning buffer which reads from the given string.  Read-
       ing starts from the first character in the string.  The end-of-input condition is set when
       the end of the string is reached.




       val from_file : string -> scanbuf

       Bufferized  file reading in text mode. The efficient and usual way to scan text mode files
       (in effect, from_file returns a scanning buffer that reads  characters  in  large  chunks,
       rather   than   one  character  at  a  time  as  buffers  returned  by  from_channel  do).
       Scanning.from_file fname returns a scanning buffer which reads from the given  file  fname
       in text mode.




       val from_file_bin : string -> scanbuf

       Bufferized file reading in binary mode.




       val from_function : (unit -> char) -> scanbuf


       Scanning.from_function  f returns a scanning buffer with the given function as its reading
       method.

       When scanning needs one more character, the given function is called.

       When the function has no more character to provide, it must signal an end-of-input  condi-
       tion by raising the exception End_of_file .




       val from_channel : Pervasives.in_channel -> scanbuf


       Scanning.from_channel  ic  returns  a  scanning buffer which reads one character at a time
       from the input channel ic , starting at the current reading position.




       val end_of_input : scanbuf -> bool


       Scanning.end_of_input ib tests the end-of-input condition of the given scanning buffer.




       val beginning_of_input : scanbuf -> bool


       Scanning.beginning_of_input ib tests the beginning of input condition of the  given  scan-
       ning buffer.




       val name_of_input : scanbuf -> string


       Scanning.file_name_of_input  ib  returns the name of the character source for the scanning
       buffer ib .






OCamldoc                                    2008-05-19                         Scanf.Scanning(3o)

Generated by $Id: phpMan.php,v 4.49 2006/02/26 13:18:18 chedong Exp $ Author: Che Dong
On Apache
Under GNU General Public License
2012-05-25 07:54 @38.107.179.240 Crawled by CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
Valid XHTML 1.0!Valid CSS!