Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] Runtime overflow and what to do
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Scott J, <jscott@p...>
Subject: Re: [Caml-list] Runtime overflow and what to do

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.


  ----- Original Message -----
  From: Jacques Garrigue
  Sent: Monday, October 14, 2002 11:46 AM
  Subject: Re: [Caml-list] Runtime overflow and what to do

  From: Chris Hecker <>
  > >        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 Archives:
  Bug reports: FAQ:
  Beginner's list: