This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
en:variables [2016/01/01 22:42] 127.0.0.1 external edit |
en:variables [2016/08/09 18:23] admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== Variables ===== | ===== Variables ===== | ||
- | Variables | + | You can think of a variable as a place in the computer' |
- | \\ | + | |
- | Variables that hold string values follow | + | ==== Example ==== |
- | \\ | + | |a = 99|Assigns the integer 99 to the variable |
- | When you assign a numeric value to a string | + | |nom = " |
- | \\ | + | |print "Say hello to " |
- | ^Variable Assignment^^^^ | + | |a = a + 1|Takes the value of a and adds one to it, then store the new value back into a| |
- | ^Operator^Name^Example^Comments^ | + | |
- | |=|Assign a Number to a Numeric Variable|a | + | |
- | |=|Assign a String to a String Variable|z$ | + | |
- | |=|Assign a Number | + | |
- | |+=|Add to Numeric Variable|a += 7|Same as a = a + 7 < | + | |
- | |+=|Concatenate | + | |
- | |-=|Subtract from Numeric Variable|a -= 9|Same as a = a - 9 <sup>1</ | + | |
- | |*=|Multiply Numeric Variable|a *= 2|Same as a = a * 2 < | + | |
- | |/=|Divide Numeric Variable|a /= 8|Same as a = a / 8 < | + | |
\\ | \\ | ||
- | <sup>1</ | + | In previous versions (before |
+ | |||
+ | See also: [[variableoperators|Variable Operators]] | ||
+ |