Topic: user defined procedure - not enough actual parameters

Hello Dmitry,
I have my own procedure that I want to use to avoid repeating a section of code many times in the script.
However, it shows an error ('not enough actual parameters');  please see the attached screen capture.
Can you tell me what is missing and what I can do to fix it?
Thanks,
Derek.

Post's attachments

Attachment icon screenshot1.jpg 170.92 kb, 162 downloads since 2019-01-29 

2 (edited by sibprogsistem 2019-01-29 18:08:17)

Re: user defined procedure - not enough actual parameters

procedure assignkeys (key: string);
begin
.......
.......
end;

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
assignkeys ('1');
end;

Re: user defined procedure - not enough actual parameters

You should specify parameters

assignkeys(Sender, Key, Shift, Alt, Ctrl);
Dmitry.

Re: user defined procedure - not enough actual parameters

Hi,
That's great - everything working as I wanted it to now.
Thanks as always for the quick response.
Regards,
Derek.