いいえ、これは定数が割り当てられる方法であるため、等号は割り当てです。たとえば、次のように考えてください。
const Pi = 3.1415;
また
const s = 'This is an example';
「型付き定数」もあります。
const Pi: extended = 3.1415;
上記のスニペットでは、 signature の関数を保持する型付き定数を定義していますfunction(const S: String): String
。そして、(互換性のある) 関数SomeVariable1
をそれに割り当てます。
SomVariable1
たとえば、コードの早い段階で定義する必要があります。
function SomeVariable1(const S: String): String;
begin
result := S + '!';
end;
次の例を検討してください。
function SomeVariable1(const S: String): String;
begin
result := S + '!';
end;
const
function1: function(const S: String): String = SomeVariable1;
procedure TForm1.FormCreate(Sender: TObject);
begin
caption := function1('test');
end;