Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] getting the value of the first expression
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Bruce Hoult <bruce@h...>
Subject: Re: [Caml-list] getting the value of the first expression
At 5:44 PM +0800 18/10/01, Rafael 'Dido' Sevilla wrote:
>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

You just need a variable binding:

   let result = emit_parm "ldc" offset in
      emit "ind";
      result

-- Bruce
-------------------
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