PDA

View Full Version : Variable


Iluvatar
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?:confused:

Digimath
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.

DickBaldwin
09-08-2008, 10:01 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?:confused:
See http://www.dickbaldwin.com/homeschool/Hs00310.htm for some information on variables

Dick Baldwin

DrJim
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. :eek:)

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.