company logo

Expression body

Keywords:  expression

An expression body can be defined as part of a class expression, but also as in line expression. The expression body is enclosed in brackets '{}' in any case. Expression code may contain some optional parts for defining variables and initializing the expression as well as an error and a final block. The only mandatory part of the expression body is the process code.

Definition: 

expr_code := '{' [var_defs] [init_code] proc_code [error_code] [final_code] '}'

Related topics