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

Reply via email to