pointer -> integer function
Kostirya <[email protected]> Wed, 28 Sep 2016 16:20:24 +0300
| Newsgroups | gmane.comp.lang.ml.mlton.user |
|---|---|
| Message-ID | <CAG+QnTfOOsusAHvKh=4GtF_22mcRiRvVW2zeJSdRZ1Jvk+PAWw@mail.gmail.com> |
Hello.I need help again... I want to get integer from pointer. I use (Word.toLargeInt o Primitive.MLton.Pointer.toWord) for 32bit I use (Word64.toLargeInt o Primitive.MLton.Pointer.toWord) for 64bit There are difficulties due to the fact that type function depends on 32bit or 64bit. How to write universal function? Like this: val p2i = if sizeofPointer = 0w8 then Word64.toLargeInt o Primitive.MLton.Pointer.toWord else Word.toLargeInt o Primitive.MLton.Pointer.toWord Nick. -- You received this message because you are subscribed to the Google Groups "MLton-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. ------------------------------------------------------------------------------ _______________________________________________ MLton-user mailing list [email protected]; [email protected] https://lists.sourceforge.net/lists/listinfo/mlton-user