Alice Community  

Go Back   Alice Community > Alice 3 > How Do I?

Reply
 
Thread Tools Display Modes
Variables
Old
jtljmeyer
Member
 
Status: Offline
Posts: 19
Join Date: May 2012
Location: Iowa
Default Variables - 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?
   
Reply With Quote
Variables
Old
djslater107
Administrator
 
Status: Offline
Posts: 190
Join Date: Jan 2007
Default Variables - 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.


Don Slater
Alice Team
Carnegie Mellon University
   
Reply With Quote
Adding 1 to a variable
Old
djslater107
Administrator
 
Status: Offline
Posts: 190
Join Date: Jan 2007
Default Adding 1 to a variable - 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...
Attached Images
File Type: jpg adding_1.jpg (20.2 KB, 22 views)


Don Slater
Alice Team
Carnegie Mellon University
   
Reply With Quote
Thanks
Old
jtljmeyer
Member
 
Status: Offline
Posts: 19
Join Date: May 2012
Location: Iowa
Default Thanks - 11-01-2012, 01:06 PM

Thanks
   
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.