Is anyone up for a little challenge? It won't be too hard, I promise. It'll just involve a little math and thinking "outside the box".
Note: First, I'll mention that this concept could find some niche uses for special cases, e.g. one way of storing multiple values in a single clone parameter, but mostly this will just be a thought experiment for anyone who chooses to accept the challenge.
The challenge is to create a demo project of the following:
- Create a functional approximation of an array where the data is stored in a single variable (no cheating and using clones )
- Since Hopscotch doesn't like big numbers, we'll limit the array to 6 indexes
- The data's number format will be single integers 0 - 9
Hint: "functional approximation" means you need to have to the ability (pun intended) to recall values from the "array" & set/change new values into the "array"
If anyone's interested in this, I'll edit & post my version of a demo project ( https://c.gethopscotch.com/p/y7e8kmb0b ) after you give it a try. Feel free to discuss & ask questions. The point is to be creative, think outside the box, make use (just for fun) of the Hopscotch tools that we have in a way in which they were not intended, and maybe even learn something.
What's an array!?
An array is like a row of cubbies. After you put your PB&J sandwich in one, you can come back later and find it so long as you know which cubby you put it in. Go to a different cubby later on and you get your friend's tuna fish
The row of cubbies has a single name & each cubby gets unique numerical index. The typical form would be MyArray(index)
Oh, and instead of sandwiches people usually put data in them