Skip to content

Instantly share code, notes, and snippets.

@yudium
Created November 2, 2015 08:48
Show Gist options
  • Save yudium/432f7acca268a3e0aa61 to your computer and use it in GitHub Desktop.
Save yudium/432f7acca268a3e0aa61 to your computer and use it in GitHub Desktop.
program variabel_scope;
{kamus utama}
var
A : Integer;
procedure tes();
{kamus lokal}
var
A : Integer;
begin
A := 7; //variabel lokal, tidak akan menghapus nilai "10" dari variabel global karena mereka berdua berbeda
end;
begin
A := 10; // variabel glokal
tes();
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment