Question: Error, illegal use of an object as a name

f1:=proc(n) local x,y,i,rx ,ry,dumbindex:  

dumbindex:=1:  

xdumb[1]:=n:  

ydumb[1]:=n:  

for i from 1 to  n do    

d:=0.00197241:  flag:=1:  

while(d>0.0019724 or flag=1) do    

rx:=rand(1..n):  x[i]:=rx():  ry:=rand(x[i]..n):  y[i]:=ry():  flag:=check(x[i],y[i],xdumb,ydumb,dumbindex):  

if flag=1 then  dumbindex:=dumbindex+1  xdumb[dumbindex]:=x[i]:  ydumb[dumbindex]:=y[i]:  fi:  

p,d:=f(x[i],y[i]):  

end :  

xl[i]:=x[i]:yl[i]:=y[i]:  

if  i=1 then   temp:=p:xg:=x[i]:yg:=y[i];  

else  

if p<temp then   temp:=p:xg:=x[i]:yg:=y[i] ;  fi:  

fi:

end do:  

return xg,yg:  

end proc;

 

That's the definition of my procedure. It reported illegal use of an object as a name error. Could anyone help have a look and point out what goes wrong. I just started using Maple. Thanks a million in advance.

Please Wait...