From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA03293; Sun, 17 Jun 2001 12:16:50 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA10854 for ; Sun, 17 Jun 2001 12:16:49 +0200 (MET DST) Received: from ontil.ihep.su (ontil.ihep.su [194.190.161.63]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f5HAGmv04301 for ; Sun, 17 Jun 2001 12:16:48 +0200 (MET DST) Received: from localhost (vsl@localhost) by ontil.ihep.su (8.11.0/8.11.0) with ESMTP id f5HA8Sv20610; Sun, 17 Jun 2001 14:08:42 +0400 Date: Sun, 17 Jun 2001 14:08:28 +0400 (MSD) From: Vitaly Lugovsky To: cc: caml Subject: Re: [Caml-list] Newbie: declarations In-Reply-To: <20010616170909.B10922@jean> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, 16 Jun 2001 leary@nwlink.com wrote: > Is there a way to declare a variable and not initialize it, like C? > > int i; > i = 0; It's an almost functional language, so please avoid variables. And use references only when you really need 'em. Refer to the Guide about references and named tuples. > More to the point, is there a way to declare a record variable without > listing/initializing all the fields? If yes, what are the default values? You have to initialize 'em always. 'cause you're using a strictly typed language. ------------------- 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