![]() |
Variables
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?
|
Variables
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. |
Adding 1 to a variable
1 Attachment(s)
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... |
Thanks
Thanks
|
All times are GMT -5. The time now is 03:27 PM. |
Copyright ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.