Date: Fri, 12 Nov 1999 13:47:11 +0100
From: Christian RINDERKNECHT <rinderkn@hugo.int-evry.fr>
To: skaller <skaller@maxtal.com.au>
Subject: Re: Undefined labels
In-Reply-To: <382AAB06.F3DF8CC0@maxtal.com.au>; from skaller on Thu, Nov 11, 1999 at 10:39:50PM +1100
Hello,
> (Unix.fstat argument).st_kind
>
> Here, the function returns a structure, st_kind
> is a label of that structure, but it is not known
> in the calling module. Is there a syntax for this?
Yes:
(Unix.fstat argument).Unix.st_kind
^^^^
because the compiler doesn't know in what module to look-up for label
[st_kind].
> Using 'open Unix' is unacceptable.
I also never use the "open" feature, but the consequence is, when using
nested records, I must qualify all the labels (as in your example),
and the code becomes unreadable.
I recently started using classes in order to avoid this practical
problem, since methods are in the scope of their object, not of the
module embedding their class.
But this doesn't work if the library you are using is not
object-oriented, of course:)
Best regards,
--Christian
----------------------------------------------------------------------- Christian Rinderknecht Phone +33 (0)1 60 76 44 43 Institut National des Télécommunications Fax +33 (0)1 60 76 47 11 Département Logiciels Réseaux (LOR) WWW 9, Rue Charles Fourier, F-91011 Évry Cedex
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:28 MET