Basic Expressions

Sather - Language Specification
Prev |  | Next

# Chapter 7. Basic Expressions

    expression ==>
            self_expression | local_expression | call_expression | void_expression | void_test_expression | new_expression | create_expression | array_expression | and_expression | or_expression | sugar_expression | while!_expression | until!_expression | break!_expression | except_expression | initial_expression | result_expression | closure_create_expression

Sather expressions are used to compute values or to cause side-effects. If they return a value, then they have a return type that is either explicitly declared or inferred from context.

# 7.1. self expressions

Example 7-1. Example:

    self

    self_expression ==>
            self

self expressions may appear in the bodies and in the pre and post clauses of routines and iters. They return the object on which the method was called. The return type is the type in which the method appears.

Prev | Home | Next
Floating point literal expressions | Up | Local variable access expressions