Example:
'This program is to illustrate the setting of variables.
Chipmunk = 46 'Sets the variable Chipmunk to 46
Animal = Chipmunk 'Sets the variable Animal to the value of
the variable Chipmunk
Bear = 2 + 3 * 5 'Sets the variable Bear to the result of 2
+ 3 * 5, 17.
Sheep = (2 + 3) * 5 'Sets the variable Sheep to the result of
(2 + 3) * 5, 25.
Animal = 2 * Bear 'Sets the variable Animal to twice the
value of Bear.
LargeVar = 321 'LargeVar must be set as a word - see DIM.
Temp = LargeVar / 5 [WORD] 'Note the use of [WORD] to ensure that
the calculation is performed correctly
This site hosted for free by: