Operators/Member

From FizzFuzz

Jump to: navigation, search

The member operator is indicated by the . symbol. It is used on an instance of an object.

Format

a.b
a.b()

Where a is an instance and b is a variable or method.

Examples

class __class__
    int variable = 1
 
    int method()
        return 10
 
__class__ a = new
 
environment.outputln(a.variable) //Outputs "1".
environment.outputln(a.method()) //Outputs "10".