Computer Science Canada Procedures and arrays |
Author: | challenger [ Sat Jan 16, 2010 3:38 pm ] | ||
Post subject: | Procedures and arrays | ||
sorry, messed up post before What is it you are trying to achieve? Get better understanding of procedures and arrays What is the problem you are having? how do you store the value of something in the procedure in an array with the mouse input Describe what you have tried to solve this problem Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Please specify what version of Turing you are using <Answer Here> |
Author: | Prince Pwn [ Sun Jan 17, 2010 4:21 pm ] | ||||||
Post subject: | Re: Procedures and arrays | ||||||
First, create an array like such and an index counter starting at 0
Instead of using 'put' which displays the '1' or '0' to the screen, store it in the array.
To keep track of the current index, use a counter and increase it each time you click a button. You can then use a for loop to display the array.
|