User Tools

Site Tools


en:variables

This is an old revision of the document!


Variables

You can think of a variable as a place in the computer's memory to store things. Each variable has a name that must begin with a letter, and may consist of any number of letters, numbers, and dollar signs. Their names are case sensitive, the variable 'a' is not the same as the variable “A”.

Example

a = 99Assigns the integer 99 to the variable a
nom = “Jim”Assigns the string “Jim” to the variable nom
print “Say hello to ” + nomAppends the string in nom the the string “Say hello to ” and displays the result
a = a + 1Takes the value of a and adds one to it, then store the new value back into a


In previous versions (before 1.99.99.8) Variables that contained strings were required to end with a dollar sign ($). This limitation has been removed and any variable may store any type of value.

See also: Variable Operators

en/variables.1470788628.txt.gz · Last modified: 2020/02/28 10:46 (external edit)