Skip to content

Instantly share code, notes, and snippets.

@viniciussanchez
Last active October 18, 2022 12:53
Show Gist options
  • Save viniciussanchez/c79129b28700cfad9eb4a1c1920bbc23 to your computer and use it in GitHub Desktop.
Save viniciussanchez/c79129b28700cfad9eb4a1c1920bbc23 to your computer and use it in GitHub Desktop.
Somar por referência
procedure AddOne(var X, Y: Integer);
begin
X := X + 1;
Y := Y + 1;
end;
// depois que este código for executado, o valor de I será 3.
var
I: Integer;
begin
I := 1;
AddOne(I, I);
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment