Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] how to perform an inline assignation to a value containing an int32
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] how to perform an inline assignation to a value containing an int32
> i tried Int32_val(v) = v'

Yes, you can do that.  Int32_val(v) is a l-value as well as a r-value,
in C parlance.  Still, the Caml type int32 is normally immutable, so
it might be cleaner to allocate a fresh int32 using copy_int32(v').

- Xavier Leroy
-------------------
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