Last active
October 18, 2022 12:53
-
-
Save viniciussanchez/c79129b28700cfad9eb4a1c1920bbc23 to your computer and use it in GitHub Desktop.
Somar por referência
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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