Using a MACRO in a MESSAGE keyword lazarus / 21-General ---------------------------------------------------------------------- Valdas · 2023-10-12 13:59 Hello, in Interface part of unit source code I defined a MACRO, and I wat to use that MACRO in a declaration of message hadler. But i'm getting compiller errors "Identifier not found".  There is example code (simple Lazarus project): Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode objfpc}{$H+} interface {$MACRO ON}         // <---{$DEFINE NUMBER 1}  // <--- uses  Classes, SysUtils, Forms, Controls, Graphics, Dialogs,  LMessages; type   { TForm1 }   TForm1 = class(TForm)  private    procedure Priimk_plepio_zinia(var Msg: TLMessage); message NUMBER; // <---  public   end; var  Form1: TForm1; implementation {$R *.lfm}{ TForm1 } procedure TForm1.Priimk_plepio_zinia(var Msg: TLMessage);beginend; end.  FPC doesn't support macros in keywords? ---------------------------------------------------------------------- Fibonacci · 2023-10-12 14:02 Use CONST ---------------------------------------------------------------------- TRon · 2023-10-12 14:22 If I remember correctly: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$MACRO ON}{$define NUMBER:=1}{$define DONUMBER}{$define NUMBER 1} // <- this is not a valid definevar x: integer;begin  {$ifdef DONUMBER}  x := NUMBER;    {$endif}end.  But as already suggested by Fibonacci better use a const ---------------------------------------------------------------------- Valdas · 2023-10-12 14:28 Thank you!