I'm still learning Delphi/OP and stumbled upon the below (simplified) code that's part of an exercise in an old Delphi book.
type
TMyRec = record
FField1: Integer;
FField2: String;
FAnonRec: record
FAnonField: Integer;
end;
FField3: Boolean;
end;
My main question is:
1. What would FAnonRec - or rather, it's type - be called, in language terms? How do I refer to it? Something like record field of anonymous record type...? Just constructed type...? - I googled my question for some time but kept getting results about ancient Greek history... The closest I found was this error explanation.
Further questions:
2. In general, what is this type of construction called ("creating the type" right then and there instead of using a pre-declared named type)? - regardless of whether it's used as in the example or in a var block or even if no record is used.
3. The "Structure" tool in Delphi only shows FField1 and FField2:

- yet the "Class Explorer" tool shows the entire record:

- anybody know why?
4. Point 3 and the fact that this is from an old book and the fact that I have a hard time finding any more info about it make me wonder whether that kind of construction is maybe outdated/discouraged?