From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA18234; Thu, 28 Aug 2003 15:22:21 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA19889 for ; Thu, 28 Aug 2003 15:22:20 +0200 (MET DST) Received: from postfix3-1.free.fr (postfix3-1.free.fr [213.228.0.44]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h7SDMJf25268 for ; Thu, 28 Aug 2003 15:22:19 +0200 (MET DST) Received: from univ-savoie.fr (grenoble-1-62-147-75-11.dial.proxad.net [62.147.75.11]) by postfix3-1.free.fr (Postfix) with ESMTP id 07E4BC2C1 for ; Thu, 28 Aug 2003 15:22:18 +0200 (CEST) Message-ID: <3F4E0204.8080309@univ-savoie.fr> Date: Thu, 28 Aug 2003 15:22:12 +0200 From: Christophe Raffalli User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030428 X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: caml-list@inria.fr Subject: [Caml-list] Sys.command References: <20030826155658.A10130@pauillac.inria.fr> In-Reply-To: <20030826155658.A10130@pauillac.inria.fr> X-Enigmail-Version: 0.73.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig8604D22992D97C6AB6607127" Content-Transfer-Encoding: 8bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; raffalli:01 raffalli:01 univ-savoie:01 openpgp:01 2440:01 3156:01 bug:01 savoie:01 chablais:01 73376:01 univ-savoie:01 lama:01 enigmail:01 mutt:01 allocations:01 X-Attachments: type="application/pgp-signature" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8604D22992D97C6AB6607127 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit It seems that Sys.commd always returns 0 on Windows 98 (even if the command does not exist) ? (it works on XP and Linux). Is this a Bug or a Windows 98 limitation ? -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature --------------------------------------------- re about the previous loop's allocations: >> >>for(i=0;i> CAMLlocal(foo,bar); >> // use foo bar >> // callback to caml with foo bar, maybe somebody stores them somewhere >> CAMLendblock(); // want this >>} > > > If I follow you correctly, there are two ways to achieve the desired > behavior. One is to use the older API for GC root registration: > Begin_roots and End_roots. (There is some documentation in comments > in file .) > > for(i=0;i foo = bar = Val_unit; > Begin_roots(foo,bar); > // use foo bar > // callback to caml with foo bar, maybe somebody stores them somewhere > End_roots(); > } > > The other way, perhaps preferable, is to move the root registration > outside the loop: > > CAMLlocal(foo,bar); > for(i=0;i // use foo bar > // callback to caml with foo bar, maybe somebody stores them somewhere > foo = bar = Val_unit; /* don't keep roots longer than necessary > } > CAMLreturn(whatever); > > Hope this helps, > > - Xavier Leroy > > ------------------- > 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 -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature --------------------------------------------- --------------enig8604D22992D97C6AB6607127 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE/TgIKSQDyWB/+xBwRAlMnAKDNjPk1lRWszHqZlkHLC+sywGbjkQCfcdeg /PFGaJs6kvxzOu9pmrYTyCs= =zjI7 -----END PGP SIGNATURE----- --------------enig8604D22992D97C6AB6607127-- ------------------- 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