Question: Return Values in Procedures

September 19 2012 CodeKingPlusPlus 5
Maple
0

Hi All, I have the following procedure to compute the gcd between two integers:

Egcd := proc(a, b)
while b != 0 do
temp := b;
b := a mod b;
a := temp;
od;
return a;  
end proc;

Why does it simply return the value of a when the function was called? (i.e my statements inside the procedure do nothing

Please Wait...