Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Qualification of record fields
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Pierre Weis <pierre.weis@i...>
Subject: Re: [Caml-list] Qualification of record fields
Hi,

> I've got a simple code that does some Unix
>     if src_stats.st_kind != Unix.S_REG then exit 1 else ();
> 
> My problem is that I have to do
> open Unix
> for st_kind field to be available. Isn't that kind of strange? I want to use 
> Unix without opening it, qualifying symbols whenever necessary.
> 
> Thanks,
> 
> -- 
> Eray Ozkural <eozk@bicom-inc.com>

You just have to qualify st_kind: qualification in Caml is usable for
labels also. Hence, use:

if src_stats.Unix.st_kind != Unix.S_REG then exit 1;

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners