Question: Formal parameters understanding

Hi everyone.

i want to undestand how to use the passing by reference in Maple i do this:

generate_x := proc (x)

    x := (rand(1 .. 10))()

end proc;

generate_y := proc (y)

    y := (rand(1 .. 5))();

    print(y)

end proc;

print_xy := proc ()

     local x, y;

     generate_x(x);

     print(x);

     generate_y(y) end proc;

print_xy();

#print(x)  works but generate_y(y) doesn't print the value of y.

Can you help me to understand WHY i dont get the print of y.

Thanks and happy christmas to you!

Please Wait...