[Lazarus] Nested Classes used as Namespace Issue

Paul Ishenin webpirat at mail.ru
Wed Jan 12 00:11:16 CET 2011



11.01.2011 23:40, Razvan Adrian Bogdan ?????:
> On Tue, Jan 11, 2011 at 4:18 PM, Paul Ishenin <webpirat at mail.ru 
> <mailto:webpirat at mail.ru>> wrote:
>
>     11.01.2011 20:49, Razvan Adrian Bogdan wrote:
>
>          type
>           TMyStruct = record
>             NestedStruct = record
>               SimpleMember: string;
>             end;
>           end;
>
>     What compiler can compile this type?
>
>     Type keyword is requires to disctinct different sections inside
>     structures. In classes, records and object you can have inner
>     type, const, var, class var and method sections.
>
>
>
>  Opps sorry for that second "=" symbol, i meant ":" like Sven wrote 
> earlier but with class and yes it would only be visible with that 
> class and a somewhat anonymous class.
>
> " TMyClass = class
>    SubStructField: record
>       Foo: Integer;
>    end;
>  end;"
Then it is not a nested type but just a regular field which type is 
defined as anonymouse record. Initially the question was about nested 
type declaration, not about fields.

Best regards,
Paul Ishenin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110112/45c1aafc/attachment-0003.html>


More information about the Lazarus mailing list