danrox2004
2007-03-21 03:54:58
Say I had a function which changed the value of x or y to something, how would i get the global x and y to change to it… here is a simple example:
this writes in 0, 0 instead of 10, 20
Edit: Found it, for people intrested add var inside the function thing
program New;
var
x, y: integer;
function CCXX(x, y: integer): Boolean;
begin
x := 10;
y := 20;
Result := True;
end;
begin
CCXX(x, y)
Writeln(IntToStr(x) + ', ' + IntToStr(y));
end.this writes in 0, 0 instead of 10, 20
Edit: Found it, for people intrested add var inside the function thing