Version française
Home     About     Download     Resources     Contact us    
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: tim@f...
Subject: Re: [Caml-list] Runtime overflow and what to do
From: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
>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/- :.*//"

The following is simpler and works on Unix systems that have /dev/fd:

   echo "print_int Sys.word_size;;" | ocaml /dev/fd/0

I agree that a "-silent" option would be prettier than this, and it
would work on systems that don't have /dev/fd.

-- 
Tim Freeman       
tim@fungible.com
GPG public key fingerprint ECDF 46F8 3B80 BB9E 575D  7180 76DF FE00 34B1 5C78 
-------------------
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