home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / lib / Bool.sig < prev    next >
Encoding:
Text File  |  1997-08-18  |  874 b   |  27 lines  |  [TEXT/Moml]

  1. (* Bool -- SML Basis Library *)
  2.  
  3. type bool = bool
  4.  
  5. val not : bool -> bool
  6.  
  7. val toString   : bool -> string
  8. val fromString : string -> bool option
  9. val scan       : (char, 'a) StringCvt.reader -> (bool, 'a) StringCvt.reader
  10.  
  11. (* 
  12.    [not b] is the logical negation of b.
  13.  
  14.    [toString b] returns the string "false" or "true" according as b is
  15.    false or true.
  16.  
  17.    [fromString s] scans a boolean b from the string s, after possible
  18.    initial whitespace (blanks, tabs, newlines).  Returns (SOME b) if s
  19.    has a prefix which is either "false" or "true"; the value b is the
  20.    corresponding truth value; otherwise NONE is returned.
  21.  
  22.    [scan getc src] scans a boolean b from the stream src, using the
  23.    stream accessor getc.  In case of success, returns SOME(b, rst)
  24.    where b is the scanned boolean value and rst is the remainder of
  25.    the stream; otherwise returns NONE.
  26. *)
  27.