caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] ref
@ 2003-02-08 18:41 altavillasalvatore
  2003-02-09  0:06 ` Alessandro Baretta
  0 siblings, 1 reply; 3+ messages in thread
From: altavillasalvatore @ 2003-02-08 18:41 UTC (permalink / raw)
  To: caml-list

Hi all,
my problem is this:


let r = 
let a= ("b" , "c") in 
let f = ref "" in
let g = ref "" in
f:= fst a;
g:= snd a;
!f,!g;;


 val r : string * string = "b", "c"

I would want to call "a" one single time but....


let r = 
let a= ("b" , "c") in 
let f = ref "" in
let g = ref "" in
f,g := a;
!f, !g ;;

 Characters 68-71:
This expression has type string ref * string ref but is here used with type
  (string * string) ref

Regards.



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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-09  0:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-08 18:41 [Caml-list] ref altavillasalvatore
2003-02-09  0:06 ` Alessandro Baretta
2003-02-09  0:17   ` William Lovas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).