Question: Why is procedure unterminated?

Any sugggestions gratefully received

I do know that Maple has a gcd command but I am just experimenting

GCD2.mw
 

> 

``

> 

``

> 

restart

> 

"GED2:=proc(n1 ,n2)     local a,b;     option remember;     a:=n1:b:=n2:     if b = 0 then do         return a ;    else       return GED2(b, a mod b);    end if;  end proc;"

Error, unterminated procedure

"GED2:=proc(n1 ,n2)    local a,b;     option remember;  a:=n1:b:=n2:     if b = 0 then do return a ;    else  return GED2(b, a mod b);    end if;  end proc;"

 
> 

``


 

Download GCD2.mw

 

Please Wait...