Search code examples
delphidelphi-7compiler-warnings

delphi 7 - create a custom warning


I'm using Delphi 7, and I want to create a custom warning message (which will be shown at compile time), so I can warn other programmers on some modifications. I've searched on the internet but I didn't found anything relevant.

Other solutions, are welcomed as well, as long other programmers are warned about things I want, when they compile/build the sources.


Solution

  • In D2007 you can write

    {$MESSAGE 'Hello'}
    

    or

    {$MESSAGE ERROR 'Hello'}
    

    - see the documentation. This works since D6 (info courtesy of Sertac Akyuz).