[Oberon] Multiple RETURN in a procedure
Skulski, Wojciech
skulski at pas.rochester.edu
Mon Oct 24 01:23:07 CEST 2022
Aubrey:
> I applied this to the min function being discussed as follows:
I regret that I provided such a trivial function. The discussion can then divert into "how to rewrite a trivial example". This is not the real issue.
Paraphrasing Mr. Stuff Received, the real issue is "how to maintain substantial software when the language keeps changing". I would add "changing for an unclear reason". Let me throw in the example from TextFrames.Mod from Linz Oberon System V4.
In Linz V4 TextFrames.Mod, you will find a very complex PROCEDURE Edit (F: Frame; x, y: INTEGER; keysum: SET); In that procedure you will find three RETURNs. Would you advocate reworking this pretty intricate piece, if someone ever dares to port V4 to FPGA Oberon? Will this brave soul not have better things to do rather than fixing an optimization of the language?
BTW, you will find both Min and Max like mine in the very same TextFrames.Mod. Just search for RETURN and you will find both Min and Max.
Wojtek
More information about the Oberon
mailing list