Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Adam P. Jenkins <ajenkins@c...>
Subject: Scoping rules
Hi,
	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

-- 
Adam P. Jenkins 
mailto:ajenkins@cs.umass.edu