Можно ли в Обероне-07 вызвать процедуру-функцию вне выражения? Т.е. в statement'e.
Синтаксически это не запрещено. Четкого запрета в тексте также нет. Есть нечто мутное, вот это:
Цитата:
There are two kinds of procedures, namely proper procedures and function procedures. The latter
are activated by a function designator as a constituent of an expression, and yield a result that is
an operand in the expression. Proper procedures are activated by a procedure call.
Однако имеем:
Цитата:
ProcedureCall = designator [ActualParameters].
...
assignment = designator ":=" expression
expression = SimpleExpression [relation SimpleExpression].
SimpleExpression = ["+" | "-"] term {AddOperator term}
term = factor {MulOperator factor}.
factor = number | CharConst | string | "NIL" | "TRUE" | "FALSE" |
set | designator [ActualParameters] | "(" expression ")" | "~" factor.