Quantcast
Channel: Programmers Heaven Forums RSS Feed
Viewing all articles
Browse latest Browse all 2703

Const parameter

$
0
0
The Const parameter is said to be able to prevent modification of the argument value, but i am able to reassign A as seen below perfectly? So what's the difference between a Const parameter and the default parameter? (other than it working as pointer and hence saving memory for large arguments)
procedure Example(Const A: Integer);
begin
  A:=5;
end;   


Viewing all articles
Browse latest Browse all 2703

Trending Articles