Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Hi, Im Building a GUI turing Calculator, I need Help.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
icedesi




PostPosted: 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]
Sponsor
Sponsor
Sponsor
sponsor
DanShadow




PostPosted: 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
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: