[Oberon] Bit manipulation in Oberon-07
skulski at pas.rochester.edu
Sun Oct 28 22:32:30 CET 2018
in most cases, standard coding is preferred over growing teh SYSTEM with custom instructions. On the other hand, IMHO I would prefer defining my own procedures and using them, over littering the high level code with cryptic low level statements. I admit it is a my personal preference.
1) UBFX(dst, src, 5, 10); <-- procedure call
2) dst := src DIV b5 MOD b10; <-- cryptic statement.
In my own practice I would probably prefer #1. I would probably wrap #2 as a PROCEDURE and then call it in my high level code. But this would bring performance penalty on every call.
This brings up another question: how about inline procedures? We could eat the cake and have the cake.
Inlining is a standard practice in those inferior languages, you know ;-)
More information about the Oberon