Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Scoping rules
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1997-06-30 (09:34)
From: Adam P. Jenkins <ajenkins@c...>
Subject: Scoping rules
	Am I right that in Caml/O'Caml, exceptions and open statements
always occur at top-level (by top-level I mean not in a let .. in
block)?  What I mean is: in SML one can say

let open List 
    exception LocalExc of string in
  (* in here List is open and I can use LocalExc *)    

There doesn't seem to be any equivalent in Caml.  Just checking if I'm
missing something.  I realize that the scope of "open" and exception
can be limited to a structure, but I was looking for an even smaller
scope.  Thanks.


Adam P. Jenkins