[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Demexp-dev] Re: [cduce-users] OCaml/CDuce interface issue with 32 bits/
[Demexp-dev] Re: [cduce-users] OCaml/CDuce interface issue with 32 bits/64 bits architectures
Tue, 3 Oct 2006 09:10:11 +0200
2006/10/3, Alain Frisch <address@hidden>:
David MENTRE wrote:
> Any idea how to fix that cleanly, for example by reference to
> Pervasives.min_int and max_int?
With the current release, I see no way to do it within the language.
You can of course use a preprocessor to change the definition for
Ocaml_int, depending on the architecture.
Ok, we might use that approach...
You could also arrange so that your save value always accepts 63-bit
integers even on 32-bit architecture (and perhaps dynamically checks
that the integer are in the correct range).
Anyway, it's probably a good idea to export a Caml_int type that matches
the range of Caml integers on the current architecture. If you don't
want to wait for the next release, here is the diff:
... but I much prefer this approach.
We will see what we can do for our project in the meantime.
Many thanks for the quick feedback.