From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 3CF37BB83 for ; Sun, 11 Jun 2006 06:42:30 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k5B4gTp5015048 for ; Sun, 11 Jun 2006 06:42:29 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id GAA18444 for ; Sun, 11 Jun 2006 06:42:28 +0200 (MET DST) Received: from smtp.syd.people.net.au (smtp.syd.people.net.au [218.214.225.98]) by concorde.inria.fr (8.13.6/8.13.6) with SMTP id k5B4gPaD031601 for ; Sun, 11 Jun 2006 06:42:26 +0200 Received: (qmail 15273 invoked from network); 11 Jun 2006 04:35:53 -0000 Received: from unknown (HELO coltrane.mega-nerd.net) (218.214.64.136) by smtp.syd.people.net.au with SMTP; 11 Jun 2006 04:35:53 -0000 Received: from coltrane (localhost [127.0.0.1]) by coltrane.mega-nerd.net (Postfix) with SMTP id 2A0917B67 for ; Sun, 11 Jun 2006 14:35:43 +1000 (EST) Date: Sun, 11 Jun 2006 14:35:43 +1000 From: Erik de Castro Lopo To: caml-list@inria.fr Subject: Syntax for partial copy of struct member Message-Id: <20060611143543.79e8d4eb.ocaml-erikd@mega-nerd.com> Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.17; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 448B9F35.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 448B9F31.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; syntax:01 struct:01 ocaml:01 struct:01 syntax:01 verses:98 partial:01 int:01 int:01 defined:02 bat:02 face:97 let:03 let:03 perhaps:04 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 Hi all, There's something in Ocaml that allows me to have a struct defined as: type struct_t = { a : int ; b : int ; c : int } and an instance of that say: let x = { a = 1 ; b = 2 ; c = 3 } and then have: let y = { a = 2 ; (* b and c filled in from x *) } but I can't for the life of me remember the syntax. Anyone care to give me a gentle tap with the clue bat? Thanks, Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "Death is perhaps too easy" -- Iqbal Sacranie in 1989 about Salman Rushdie, author of "The Satanic Verses". Sacranie received a knighthood in 2005 as the face of 'moderate' British Islam. He has never disowned his earlier statement.