added signed_string_of_int (pruduces proper - instead of SML's ~);
authorwenzelm
Fri Dec 29 18:46:02 2006 +0100 (2006-12-29)
changeset 21942d6218d0f9ec3
parent 21941 62dd79056d70
child 21943 b7b66f440d04
added signed_string_of_int (pruduces proper - instead of SML's ~);
src/Pure/library.ML
     1.1 --- a/src/Pure/library.ML	Fri Dec 29 18:46:01 2006 +0100
     1.2 +++ b/src/Pure/library.ML	Fri Dec 29 18:46:02 2006 +0100
     1.3 @@ -136,6 +136,7 @@
     1.4    val radixpand: int * int -> int list
     1.5    val radixstring: int * string * int -> string
     1.6    val string_of_int: int -> string
     1.7 +  val signed_string_of_int: int -> string
     1.8    val string_of_indexname: string * int -> string
     1.9    val read_intinf: int -> string list -> IntInf.int * string list
    1.10    val read_int: string list -> int * string list
    1.11 @@ -705,6 +706,9 @@
    1.12  
    1.13  val string_of_int = Int.toString;
    1.14  
    1.15 +fun signed_string_of_int i =
    1.16 +  if i < 0 then "-" ^ string_of_int (~ i) else string_of_int i;
    1.17 +
    1.18  fun string_of_indexname (a,0) = a
    1.19    | string_of_indexname (a,i) = a ^ "_" ^ Int.toString i;
    1.20