5.12 How does maple handle procedure arguments?

When passing a variable to maple procedure, the variable VALUE is passed to the procedure (This is different from say Fortran where the default is pass by reference). But this is the same as with Mathematica.

For example, if a variable X had value 10, then you call a procedure FOO passing it X, then inside FOO, X will be the number 10, not the argument variable X. So, this means one can not have X on the left hand side inside FOO. Like this x:=1

The only way to assign new value to the input and return new value, is to use a local variable, like this:

one:= proc(x) 
        local y; 
        print(x); 
        y:=x+ 1; 
        print(x); 
        y; 
        end proc; 
 
z:='z'; 
z:=5; 
f:=one(z); 
 
      f := 6