S2:Member Variable

A member variable is a variable that is specific to a given class.

Consider the following code: class DataType { var int number; # int member variable called "number" function print_number;         # method called "print_number" function print_number_explicit; # method called "print_number_explicit" } function DataType::print_number { print $.number;                  # use the shorthand notation to access "number" } function DataType::print_number_explicit { print $this.number;              # use the explicit "this" operator to access "number" } var DataType dt = new DataType; $dt.number = 1; $dt->print_number;         # 1 $dt->print_number_explicit; # 1