Closed lounres closed 3 years ago
Also
function sum (id, pr, n, a):
p := 2 * m
is approved but not enterpreted. Is it bug or feature?
Compilation (and interpretation) of programs consist of multiple passes. It is convenient to do specific checks in specific passes.
The checks for usage of special functions are done at runtime. Could have been done at compile time too, but a similar amount of effort might have made the functions less special.
Some checks are hard. For example, in a more complex program, it would be hard to check whether m
exists in every possible scenario leading to a p := 2 * m
line. Akin to the halting problem. Naturally, such checks don't occur.
OK. The second comment is only a clarification question. But the first one is trivial syntax problem.
I mean, "Syntax" paragraph of documentation precisely describes syntax of the language (almost as regular expressions). And there are only one expression where receive
can be used: in assignation <var> <assignOp> receive (<from>)
. So, as I understand, it should be easy to detect the issue. Or am I wrong?
Such code example as
is approved by the interpreter called with
-c
argument. But the interpreter called without the argument states an error:that is correct depending on documentation.
P.S. Used the latest at the moment version of the enterpreter: 0.4