Hi,
 
I am following the discussion. But do not understand this. Is this a solution to eliminate overhead in integer arithmetic.
 
Personnally I thought to try to capture the overflow status flag for the pentium processor on my Windows XP.
 
Thx
 
Scott
----- Original Message -----
From: Jacques Garrigue
To: checker@d6.com
Cc: caml-list@inria.fr
Sent: Monday, October 14, 2002 11:46 AM
Subject: Re: [Caml-list] Runtime overflow and what to do

From: Chris Hecker <checker@d6.com>
> >        echo "print_int Sys.word_size" > /tmp/caml$$
> >         WORDSIZE=`ocaml /tmp/caml$$`
> >         rm -f /tmp/caml$$
>
> We clearly need a "-eval" switch to ocaml, like perl's -e/n/p.  :)

The above can be reduced to one line, without temporary file.
In fact, I feel more like we would need a "-silent" option, to get rid
of prompts and types (this is already the default with scripts).

echo "print_int Sys.word_size;;" | \
ocaml | grep "^# ." | sed -e "s/# //" -e "s/- :.*//"

A shorter but more specific approach is

echo "Sys.word_size;;" | ocaml | grep "# -" | sed -e "s/.*= //"

Jacques Garrigue
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners