I noticed that the code used "Application" rather than "TApplication", I think it should use "TApplication",
Why do you think that? I'm not trying to be hostile or give you the brushoff, I'd just like to work through this methodically
- created in the initialization section of the Forms unit.
Quote- created in the initialization section of the Forms unit.
Do you mean a hidden section? or an internal section in "Forms" unit?
Really, I saw "T" letter removed, so I thought that we have maybe two different classes.
OK, let's try and go through this gradually: while VisualLab's answer is correct I think that I can help you catch some fish tomorrow as well :-)
A leading "T" is a convention, /not/ enforced by the language or Lazarus IDE, that indicates that you're looking at a type.
A class is a particular flavour of type, and there's a great deal of magic in the compiler which does things to classes over and above what's done to other types (integers, arrays, strings and so on).
A class is instantiated by a call to its constructor, which in Object Pascal is normally called Create(). The constructor returns an instance of that class, which includes allocated memory and so on.
A class can have memory which is accessible by all instances, which is generally indicated by field names etc. marked with the "class" attribute. You would access a property (etc.) marked with the class attribute via the type name (e.g. TApplication).
If you start off at https://lazarus-ccr.sourceforge.io/docs/lcl/ and use the index to find the description of TApplication, you see that nothing is marked with the class attribute. Therefore, all storage documented there is allocated to instances; you would access a property (etc.) viaa named instance (e.g. Application).
The above is a general discussion of types, classes and instances. Below is more specific.
The .lpr file ("Lazarus PRogram") is generated by the IDE, so it's reasonable to assume that it's correct.
The Application object is the sole instance of TApplication. The constructor is called in the Forms unit, and the global variable representing the instance is stored (and exported) there.