If I pass a variable as a constant does it automatically get passed by reference?
procedure foo(const x : integer)
I can already pass a variable by reference like this:
procedure foo(var y : integer);
Ideally I'd want something like the code below:
procedure foo(const var z : integer)
const
does not guarantee that the value is actually passed by reference.Free Pascal supports
for this purpose: z is always passed by reference in this case. I'am not aware of something similiar in other pascal compiler.