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

Username:   Password: 
 RegisterRegister   
 code for a click counter
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
neverstopbelevin




PostPosted: Thu Nov 18, 2010 5:17 pm   Post subject: code for a click counter

What is it you are trying to achieve?
<Replace all the <> with your answers/code and remove the <>>


What is the problem you are having?
<Answer Here>


Describe what you have tried to solve this problem
<Answer Here>


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>

Turing:


<Add your code here>



Please specify what version of Turing you are using
<Answer Here>
Sponsor
Sponsor
Sponsor
sponsor
neverstopbelevin




PostPosted: Thu Nov 18, 2010 5:19 pm   Post subject: RE:code for a click counter

MY POST GOT MESSED UP ABOVE

i need to make a click counter

i have the following code, however when i run it it continues adding until i stop clicking.

for example 1..infinity.
how do i get it to count 1?


var mx, my, mb : int
var c : int := 0
loop
mousewhere (mx, my, mb)
if mb = 1
then
c := c + 1
put c
end if
end loop
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: