The problem is that I want to see some intermediate results that are
mixed with other data types in tuples. I know I could write wrapper
functions converting all intermediate integer results to string, but
it's kind of tedious since I need to add that function to everywhere I
want to see the hex format. A more desired solution is to turn on some
flag, since I basically only need to see the hex format of integers.
Lu
Gergely Buday wrote:
Lu Zhao wrote:
Is there a way to make polyml display an integer in its hex format? For
example,
0x12;
val it = 18 : int
I want to have 0x12 echoed back instead of 18.
I do not know about echoing but you can print integers in hexadecimal
format using
Int.fmt: StringCvt.radix -> int -> string
http://standardml.org/Basis/string-cvt.html#SIG:STRING_CVT.radix:TY
http://standardml.org/Basis/integer.html#SIG:INTEGER.fmt:VAL
e.g.
- Int.fmt StringCvt.HEX 18;
val it = "12" : string
- Gergely
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml