PDA

View Full Version : Variables


jtljmeyer
10-30-2012, 04:47 PM
Are variables limited to the specific procedure tab or can they be universal. For example can I have a counter in a procedure called Counter and then use its result in my first method or another procedure?

djslater107
11-01-2012, 10:35 AM
Alice 3.1 is designed to support the transition to Java, and therefore follows the Java rules on scope. This means that you can create a variable/property in the Scene class, and all other methods of the Scene class may see that variable, but if you have an alien object in your scene, and create a procedure for the alien, it cannot see the scene variable, because it is part of the scene class. We have not yet implemented a public modifier, which exists in Java. Also, a variable/property for the alien, or in an alien procedure cannot be seen by the scene.

I hope that this helps.

djslater107
11-01-2012, 10:39 AM
I thought I also saw a question about adding 1 to a variable...

I could not see the image you uploaded, but I have attached an image that I hope will answer the questions...

jtljmeyer
11-01-2012, 01:06 PM
Thanks