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 MAA28219; Thu, 18 Oct 2001 12:08:44 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA27966 for ; Thu, 18 Oct 2001 12:08:42 +0200 (MET DST) Received: from mail.tepkom.ru (mail.tepkom.ru [195.9.10.14]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f9IA8c125306 for ; Thu, 18 Oct 2001 12:08:38 +0200 (MET DST) Received: from oops.tepkom.ru (IDENT:dsl@oops.tepkom.ru [195.9.10.179]) by mail.tepkom.ru (8.11.6/8.11.6) with ESMTP id f9IA8L018021; Thu, 18 Oct 2001 14:08:21 +0400 (MSD) (envelope-from dsl@tepkom.ru) Date: Thu, 18 Oct 2001 14:05:32 +0400 (MSD) From: Dmitry Lomov To: "Rafael 'Dido' Sevilla" cc: Caml List Subject: Re: [Caml-list] getting the value of the first expression In-Reply-To: <20011018174410.A10054@team.ph.inter.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi Rafael, On Thu, 18 Oct 2001, Rafael 'Dido' Sevilla wrote: > it's needed in my compiler. Say I have a group of functions like this. > > emit_parm "ldc" offset; > emit "ind" > > The value of this whole expression is the value of the emit application. > What if I want the value of the entire expression to be the value of > the emit_parm application? I can't interchange the order of these two > expressions obviously because the two function applications have side > effects (they generate the assembly language for my virtual machine > architecture) Is there a way to do this? I've been able to work around > my ignorance of the existence of such a feature but I can't help but > feel that there *must* be a better way. The better way is: let value = emit_parm "ldc" offset in emit "ind"; value Dmitry -- Dmitry Lomov / Lanit-TERCOM Inc. Phone: +7(812)428-45-24 e-mail: dsl@tepkom.ru ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr