Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Variable
Old
Iluvatar
Guest
 
Status:
Posts: n/a
Question Variable - 09-08-2008, 02:21 PM

sry i am a beginner

i cant understand what the "variable" does
and the event "if a variable change"
can somebody explain me what the variable does?
   
Reply With Quote
Old
Digimath
Guest
 
Status:
Posts: n/a
Default 09-08-2008, 09:54 PM

A variable is something with a name that can be assigned a value. My program might have a variable called Score and I would increment the value stored in this variable each time a point was made.

Sometimes it is not easy to just jump into programming. Unless you have some specific need to use Alice right now, I recommend taking a look at Scratch http://scratch.mit.edu . It is a much easier programming language, the Scratch web site has a forum http://scratch.mit.edu/forums/viewforum.php?id=31 just for new users, and they have several tutorial galleries.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 09-08-2008, 10:01 PM

Quote:
Originally Posted by Iluvatar View Post
sry i am a beginner

i cant understand what the "variable" does
and the event "if a variable change"
can somebody explain me what the variable does?
See http://www.dickbaldwin.com/homeschool/Hs00310.htm for some information on variables

Dick Baldwin
   
Reply With Quote
Variables
Old
DrJim
Guest
 
Status:
Posts: n/a
Default Variables - 09-09-2008, 07:00 PM

Just looked at Dick Baldwin's reference - excellent as always - but also possibly a bit confusing.

"Variable" is one of the confusing things in programming that have a general meaning and also some very specific meanings in terms of a computer language. In Alice (and some other languages) - a distinction is made between a variable and a parameter, which is a variable passed to a method. Hence a parameter is a variable but a variable is not necessarily a parameter. (If that's clear to you - well maybe you've been working with computers to much. )

IMO - this is just one of those things you have to accept as a difference between a normal language - in which you can write poetry and the like - and a computer language, which is designed to interface with a basically dumb machine.
   
Reply With Quote
Reply

Thread Tools
Display Modes

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 ©2021, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.