Foundry
2013-10-12 22:42:28
It's a little difficult to explain (since I'm such a noob at programming/scripting) but I am trying to make a procedure that takes the name of two global variables, manipulates them, and assigns a new value to the global var it was passed. Here's an example of what I am trying to do -
program Example;
var
Ball2, Ball3: Integer;
procedure addNStuff(var1, var2); //I want variables to be parameters
begin
var1 := manipulateAndDoStuff(var1) + var2; //And I want it to be able to return
end; //a value back to the global variable.
begin
addNStuff(Ball2, Ball3); //So I can just pass the names of the variables to the function.
end.