There is an error in a sample program?
Posted: Thu Jun 05, 2014 7:57 pm
I tried one of the sample program: examplesgraphicspie.bas
The program source:
-----------------------------------------------
object myform as form
onpaint=test
end object
myform.showmodal
sub test
dim x as integer,y as integer,r as integer
x=myform.clientwidth/2
y=myform.clientheight/2
r=70
myform.canvas.pie(x,y,r,0,60,0,rgb(255,0,0))
myform.canvas.pie(x,y,r,60,110,0,rgb(0,255,0))
myform.canvas.pie(x,y,r,110,260,0,rgb(0,0,255))
myform.canvas.pie(x,y,r,260,360,0,rgb(0,255,255))
end sub
-----------------------------------------------
The compiler gives this error message:
error 72 line 6 `TEST` already used
What can I do now?
PaPi
The program source:
-----------------------------------------------
object myform as form
onpaint=test
end object
myform.showmodal
sub test
dim x as integer,y as integer,r as integer
x=myform.clientwidth/2
y=myform.clientheight/2
r=70
myform.canvas.pie(x,y,r,0,60,0,rgb(255,0,0))
myform.canvas.pie(x,y,r,60,110,0,rgb(0,255,0))
myform.canvas.pie(x,y,r,110,260,0,rgb(0,0,255))
myform.canvas.pie(x,y,r,260,360,0,rgb(0,255,255))
end sub
-----------------------------------------------
The compiler gives this error message:
error 72 line 6 `TEST` already used
What can I do now?
PaPi