Alice Community Variables

 Variables
 PogoDaMonkey Guest   Status: Posts: n/a Variables - 11-27-2006, 01:02 PM I have done a little programming in TI-Basic for the calculator, and would like to know if it is possible to manipulate variables in a way that you can use an equation with variables, then set the resulting number as another variable for future use. An example... (Ask user for input1), a (User gives 10) (Ask user for input2), b (User gives 5) (Ask user for input3), c (User gives 2) a x b / c = 25 Store 25 as d d x a / b = 50 Store 50 as e e / d = ? (Find this value) Is this possible? Thanks for any input. (pun intended) Last edited by PogoDaMonkey; 11-27-2006 at 01:04 PM.
 Parameters and Variables
 DrJim Guest   Status: Posts: n/a Parameters and Variables - 11-27-2006, 09:03 PM Alice supports both "parameters" and "variables". Variables are local to a method and are reset to their default value each time the method is started - so unless you keep the method running, the value won't be permanent. (Since the world is always running, world level variables will keep their values regardless of what other methods are active.) Parameters are values passed to functions and other methods. In both the function and method templates there are buttons to click on to create new parameters or variables which will bring up menus to select name, data type, etc. You can also create a world level variable by clicking on a button in the world property list. Once you have created a variable or parameter, you can drag in into the main edit area and set its value. There are too many option to describe here but basically there are math functions that can be used in the pull down menus and a variety of object level and world level functions which can be seen in the respective function lists. If you have access to one of the texts, you might go through the index references to "functions" and "variables" - although they really cover only a few of the many options available. The best way is just to spend some time working with the options - especially the world level functions - see http://www.alice.org/community/showthread.php?t=423 .

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops     Alice Player and VR General Discussion     Questions and Comments     The Lounge