Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] camlp4 and assignments
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stefano Zacchiroli <zack@b...>
Subject: Re: [Caml-list] camlp4 and assignments
On Mon, Jul 14, 2003 at 02:21:05PM +1000, Pietro Abate wrote:
> <:str_item<$lid:"foo" := $str:"bar"$ >>
> 
> and the expected result should be
> let _ = foo := "bar"
> 
> but I get
> 
> let _ = foo <- "bar"

Inside quotations you have to use revised syntax in which refs are
declared as record types with a "val" field.

Standard syntax:      foo := "bar"
Revised syntax:       foo.val := "bar"

Cheers

-- 
Stefano Zacchiroli  --  Master in Computer Science @ Uni. Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it}  -  http://www.bononia.it/zack/
"  I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!  " -- G.Romney

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