Browse thread
[Caml-list] Newbie: declarations
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Vitaly Lugovsky <vsl@o...> |
| Subject: | Re: [Caml-list] Newbie: declarations |
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