next up previous
Next: Variable declarations Up: Unit 02 Previous: Variables: main properties

Variables and shoe-boxes

We can intuitively understand the meaning of variables by comparing them with labeled shoe-boxes in a cupboard:

  1. name - label
  2. type - form of the box (determines which type of shoes we can put in the box)
  3. address - position in the cupboard (the fact that the location does not change means that the shoe-box is nailed to the cupboard)
  4. value - shoe inside the box


next up previous
Next: Variable declarations Up: Unit 02 Previous: Variables: main properties