Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type
- TCallback = function(Value: string): Boolean;
- function Call(Value: string): Boolean;
- begin
- ShowMessage(Value);
- Result := Boolean(Random(2));
- end;
- procedure Proc(Callback: TCallback);
- begin
- if Assigned(Callback) then
- ShowMessage('Callback вернул ' +BoolToStr(Callback('Внутри callback'), True));
- ShowMessage('Внутри процедуры');
- end;
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- Proc(Call);
- Halt;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement