This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-02-22 22:57:21

Virtualdarks
Scratcher
Registered: 2009-12-02
Posts: 6

Variable variable

Hello there. My names Virtualdarks. I don't get on the forums often but when I do, I often just want to post a new possible block that could help me with my scripting. The new block I came up with is a variable... er... variable. You're probably wondering, what is a "variable variable"? A variable variable is when you want to use a certain variable that is commanded by another, this is getting annoying, variable. Example, I have 2 variables. Variable A and B. I make a third one called C. I script it so A will add 1 to a certain variable. I set variable A to, for example, B (you know, just click set A to [b]). Now, this is where my idea comes in. There's a new block, there's a set and change and show and hide for this variable but it is used differently. So, I can change variable variable's A to 1, and since variable A says B, variable B changes. Get the idea? I'm sorry that this is complexed, but I can't script a graphing calculator without this! Thanks for reading. I hope it didn't hurt your mind too bad.


-Virtualdarks

Offline

 

#2 2011-02-24 20:02:38

FuzzyCat007
New Scratcher
Registered: 2010-06-19
Posts: 5

Re: Variable variable

To me, this seems like a POINTER in a programming language like C or C++, where the variable receives an "address" to another variable and, when it is accessed, just "points" to the original variable and accesses this instead. I admit I didn't really read your message, but is this the gist of your suggestion?

Offline

 

Board footer