Gentee Programming Language > Documentation > Syntax Download documentation

Expressions And Operators

Expressions are considered to be a part of function body or block.
Expressions consist of operands and operators. Expressions are built from constants, strings, data sets, variables, function calls, method calls and type names. Gentee defines the term "object or structure". An object consists of fields; moreover, it can have methods and an array of elements. Array is a structure which is declared by its dimensions, number of elements and the element type. Furthermore, an array is considered to be the arr type or some other types.
Lvalue is an expression that refers to some memory location. An l-value can be an object or a variable of fundamental type or an element of an array or a field of a structure.
Logical expressions can be denoted by numeric expressions. A logical expression is TRUE, if it returns nonzero. If a logical expression returns zero, it is treated as FALSE.

<object> ::= <variable name> | <pointer> | <array element> | <field> | <function call> | <method call> | <expression> | <late binding>
<lvalue> ::= <object> | <variable name> | <pointer> | <array element> | <field>
<operand> ::= <lvalue> | <constant> | <string> | <binary data> | <collection> | <function call> | <method call> | <type name> | <late binding>
<increment operator> ::= '++' | '--'
<assignment operator> ::= '=' | '%=' | '&=' | '*=' | '+=' | '-=' | '/=' | '<<=' | '>>=' | '^=' | '|='
<unary operator> ::= '+' | '-' | '*' | '!' | '~' | '@'
<bynary operator> ::= '==' | '!=' | '>' | '<' | '<=' | '>=' | '&&' | '||' | '&' | '%' | '*' | '/' | '+' | '-' | '<<' | '>>' | '^' | '%==' | '%!=' | '%>' | '%<' | '%<=' | '%>=' | '@'
<operator> ::= <increment operator> | <assignment operator> | <unary operator> | <bynary operator>
<assignment expression> ::= <lvalue><assignment operator><expression>
<lvalue expression> ::= '&'<lvalue> | '&'<function name> | <increment operator><lvalue> | <lvalue><increment operator>


 Copyright © 2004-2006 Gentee Inc. All rights reserved.