Closed codemanyak closed 8 years ago
Mostly done. Some of the code generators will have to be updated or tuned a little. Prototype available in branch codemanyak/Structorizer.Desktop/master. Keyword configuration still waiting for request.
Generators prepared to cope with Jump instructions (as far as possible)
Executor and all generator updates ready, only waiting for release integration.
Mechanism for Oberon actually introduced, processing of empty jumps fixed for Pascal (due by version 3.23-15)
return
instructions the following strategies may be considered: a) immediate return from the procedure with the given result (consistent with C, C++, C#, Java etc., cf #21); b) Just a preset of the result value (equivalent to assignments to the function name or a variable named "result", "Result", or "RESULT") which was more or less what the Structorizer behaviour before bugfix KGU#77 might have been interpreted as). In case of a) it actually represents an unstructured exit and should hence be placed in a JUMP element if it's not the very last and unconditioned instruction of the entire diagram. A new Analyser task would be to produce a warning if "return" instructions occur in ordinary instruction elements other than the very last one. In case of b), however, there are several concurring mechanisms to preset the result value, which would make sensible a new Analyser task to check if several of them occur in the same diagram. c) The flexible approach would be to let "return" have the effect a) if placed within a JUMP element and the effect b) otherwise.