11.01.2011 23:40, Razvan Adrian Bogdan ?????:
On Tue, Jan 11, 2011 at 4:18 PM, Paul Ishenin <[email protected] <mailto:[email protected]>> 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
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to