[fpc-devel] "automated" section

Michael Van Canneyt michael at freepascal.org
Sun Apr 13 09:57:36 CEST 2025



On Sun, 13 Apr 2025, Martin Frb via fpc-devel wrote:

> According to a comment in the Lazarus Highlighter code, there either is 
> or used to be a class section "automated" (just like public, private, ...)
>
> I can't find many refs in the fpc source. The most helpful (if calling 
> it that) is from  packages\fcl-passrc\tests\tcresolver.pas
> This shows at least, that it is used as class section, and that the 
> section can then have a field.
>
> But the compiler does not seem to like it. Any attempt to put it into 
> any code (tried various $mode) leads to errors only.
>
> So the question is: Does it still exist?
> Or is it time to remove it from the HL?

Automated exists for Delphi compatibility. It is used for COM servers on
windows. It is the same as 'public' for all practical purposes, although
there are some restrictions.

The fcl-passrc parser handles it because it can be used to document Delphi
code, and as such must be able to handle this section.

You can find more info here:
https://docwiki.embarcadero.com/RADStudio/Athens/en/Classes_and_Objects_(Delphi)#Automated_Members_.28Win32_Only.29

FPC itself does not understand or use it. Maybe an issue should be filed for it.

Michael.


More information about the fpc-devel mailing list