Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/benchmarks/todo/format/format-sig.sml
ViewVC logotype

View of /sml/trunk/benchmarks/todo/format/format-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 193 - (download) (annotate)
Fri Nov 20 17:43:59 1998 UTC (22 years, 10 months ago) by monnier
File size: 925 byte(s)
Initial revision
(* format-sig.sml
 *
 * COPYRIGHT (c) 1992 by AT&T Bell Laboratories.  See COPYRIGHT file for details.
 *
 * Formatted conversion to and from strings.
 *
 * AUTHOR:  John Reppy
 *	    AT&T Bell Laboratories
 *	    Murray Hill, NJ 07974
 *	    jhr@research.att.com
 *)

signature FORMAT =
  sig

    datatype fmt_item
      = INT of int
      | BOOL of bool
      | STR of string
      | REAL of real
      | LEFT of (int * fmt_item)	(* left justify in field of given width *)
      | RIGHT of (int * fmt_item)	(* right justify in field of given width *)

    exception BadFormat and BadArgList

    val format : string -> fmt_item list -> string
    val formatf : string -> (string -> unit) -> fmt_item list -> unit

    val scan : string -> string -> fmt_item list
    val scani : string -> (string * int) -> (fmt_item list * int)
(*    val scanf : string -> (int -> string) -> string -> fmt_item list*)

  end (* FORMAT *)

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0