Hi, Im Building a GUI turing Calculator, I need Help.
Author |
Message |
icedesi
![](http://www.kavoo.com/phpBB/images/avatars/gallery/halo_franck.jpg)
|
Posted: Sun Jan 04, 2004 5:32 pm Post subject: Hi, Im Building a GUI turing Calculator, I need Help. |
|
|
setscreen ("graphics:800;600")
%Calculator Physical Shape
var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,x,y,z:int
procedure physical
drawbox (100, 200, 450, 470, 1)
drawline (100, 430, 450, 430, 1)
drawbox (107, 435, 443, 465, 1)
drawline (370, 200, 370, 430, 1)
end physical
physical
procedure button1 (var x,y,b :int)
drawbox (107, 205, 187, 285, 1)
loop
mousewhere (x,y,b)
exit when b = 1 and 107 <= x and x <= 187 and 205 <= y and y <= 285
end loop
end button1
button1
Whats happening is that Turing keeps giving me the error that im missing some parameters in the subprogram button1, see for yourself, im boggled, i really need help on this. THX![/quote] |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
DanShadow
![](http://compsci.ca/v3/uploads/user_avatars/12142970654c996e83e6997.png)
|
Posted: Sun Jan 04, 2004 5:40 pm Post subject: (No subject) |
|
|
Here, now it works:
code: |
setscreen ("graphics:800;600")
var xx, yy, bb : int
%Calculator Physical Shape
var a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, x, y, z : int
procedure physical
drawbox (100, 200, 450, 470, 1)
drawline (100, 430, 450, 430, 1)
drawbox (107, 435, 443, 465, 1)
drawline (370, 200, 370, 430, 1)
end physical
physical
procedure button1
drawbox (107, 205, 187, 285, 1)
loop
mousewhere (xx, yy, bb)
exit when bb = 1 and 107 <= xx and xx <= 187 and 205 <= yy and yy <= 285
end loop
end button1
button1
|
I declared variables xx,yy,bb at the top, and you declared x,y,b twice before so I made them xx,yy,bb. Your welcome |
|
|
|
|
![](images/spacer.gif) |
|
|