[fpc-devel] Type definition
Paul Davidson
pdavidson at coraxnetworks.com
Sat Mar 4 18:57:41 CET 2006
unit aUnit;
interface
type
aType = ( at_First, at_aaa, at_bbb, at_Last );
aObj = class
aVar : aType
unit bUnit;
interface
uses aUnit;
type
bObj = class( aObj )
unit cUnit
interface
uses bUnit;
type
cObj = class( bObj )
implementation
aVar := at_Last; <----------- ERROR!
The implementation of cUnit requires a USE aUnit; in order to compile
since at_last is no longer visible.
On Mar 4, 2006, at 12:49, Micha Nelissen wrote:
> On Sat, 4 Mar 2006 10:24:14 -0500
> Paul Davidson <pdavidson at coraxnetworks.com> wrote:
>
>> Quite often a type is defined in INTERFACE part, but only used within
>> class/object defined in same unit.
>> 1) This means that type is public. This is not always good thing in
>> OOese.
>> 2) Unit must be specified in child's child's USE list.
>
> Can you elaborate on the second point ?
>
> Micha
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
>
P Davidson
Corax Networks Inc.
http://CoraxNetworks.com
IMPORTANT NOTICE: This message is intended only for the use of the
individual or entity to which it is addressed. The message may contain
information that is privileged, confidential and exempt from disclosure
under applicable law. If the reader of this message is not the
intended recipient, or the employee or agent responsible for delivering
the message to the intended recipient, you are notified that any
dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error,
please notify Corax Networks immediately by email at
webmaster at coraxnetworks.com. Thank you.
More information about the fpc-devel
mailing list