It seems that sometimes Delphi is case sensitive - the override method should match the case of the ancestor

Today I came across a “weird” tip: the xxxx override method should match the case of yyyy ancestor. The solution was to declare the method name exactly the same as in the ancestor .... I believe that this is what rested in the compiler using the Delphi.Net compiler ...

Declaring a method in the same way as in the ancestor made the compiler "silent". Are there other “case sensitive” hints / warnings in Delphi 2006?

+6
source share
1 answer

This is a tip to protect your code when interacting with third-party code.
This hint was introduced with the addition of Delphi for .net, because some other .net platforms are case sensitive.

Note that the hint does not imply any sensitivity to the incident in the Delphi part.
Only in paragraph 1 below is Delphi itself case sensitive, point 2 is an artifact of how the Delphi compiler calls the case-sensitive GetProcAddress() function in the Windows API.

Delphi behavior-sensitive behavior

1-Component Registration
I don’t know any other case-sensitive tips, but note that when you write your own components and want to register them, the register function you declare should be written like this:

 procedure Register; <<-- Leading capital required. 

If you are not Delphi do not add your new component.

2-Import external functions

As David stated, when importing external functions, the exact case used in the DLL must be preserved.

Individual tips cannot be disabled
Note that you cannot disable a specific hint: Is it possible to disable certain Delphi hints?

+12
source

Source: https://habr.com/ru/post/899225/


All Articles