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
compiler question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-07-23 (07:58)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] compiler question
On Sat, Jul 22, 2006 at 09:19:15PM +0200, Michael Wohlwend wrote:
>   let idx = ref 0 in
>   try
>     while true do
>       a0.(!idx) <-get32 file;

You shouldn't rely on the order that these are executed.  Normal
parameter evaluation (which this is not) in OCaml happens to be right
to left, but it's not defined to be that way.  Use the let binding if
you depend on a particular ordering.

> let t = get32 file in
> a0.(!idx) <- t;


Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology -
Team Notepad - intranets and extranets for business -