Regards
I am still learning to program in pascal, so I have a doubt as to the syntax of the language for which I need please explain its operation.
In some examples that I analyze with the intention of instructing myself, I see that they make calls to procedures and put the @ symbol before it, I give an example:
procedure TForm1.RichMemo1PrintAction(Sender: TObject;
APrintAction: TPrintAction; PrintCanvas: TCanvas; CurrentPage: Integer;
var AbortPrint: Boolean);
begin
if APrintAction=paPageStart then begin
PrintCanvas.Brush.Color:=clBlue;
PrintCanvas.Brush.Style:=bsSolid;
PrintCanvas.Ellipse(100,100,200,200);
end;
writeln('action: ', APrintAction);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
RichMemo1.OnPrintAction:=@RichMemo1PrintAction;
end;
By calling the RichMemo1PrintAction procedure, you put the @ before, why is that done? I can't understand it at all. I think it is because the property to which reference is made and to which some value must be stored, is assigned in this way the result of the procedure that is called ?, I do not know if that is why.
Please, thank you who can help me understand my doubt
Sincerely,
Ever Delgado