Primary Expression

primary-expression:
        lvalue
        ( expression )
        primary-expression [ expression ]
        primary-expression ( expression-listopt )

An lvalue is an simple expression. The value of the object is returned.

A parenthesized expression is a primary expression whose type and value are identical to those of the unadorned expression.

A primary expression followed by an expression in square brackets is a primary expression. The intuitive meaning is that of subscript. The primary expression must have type string or list.

A function call is a primary expression followed by parentheses containing a possibly empty, comma-separated list of expressions which constitute the actual arguments to the function. The primary expression must be of type function.

In preparing for the call to a function, a copy is made of each actual parameter (even it is a string or a list); thus all argument-passing in EDEN is strictly by value. A function may change the values of its formal parameters, but these changes cannot affect the values of the actual parameters. On the other hand, it is possible to pass a pointer on the understanding that the function may change the value of the object to which the pointer points. The order of evaluation of arguments is undefined by the language. (Although the current implementation evaluates parameters from left to right, the user should not assume this fact.)


[BACK] [HOME] [UP] [HELP]