Frank Heckenbach wrote:
CBFalconer wrote:
... snip ...
The preparatory step is to accept the 'packed' reserved word in such statements, and discard it.
Maybe this wasn't clear in previous messages, but GPC allows and respects it for subranges already.
However, I fear it's non-standard. EP, 6.4.3.1:
newÂstructuredÂtype = [ `packed' ] unpackedÂstructuredÂtype . unpackedÂstructuredÂtype = arrayÂtype | recordÂtype | setÂtype | fileÂtype .
At some time in the future it would also be possible to implement offset non-symettric ranges with this syntax. E.G. "packed -64 .. 191;" could indicate a one byte quantity, whose zero value is actually represented by 0x40 (in C nomenclature). Such a mechanism can also handle unsigned ranges. This is pure blue-skying.
This should be possible. I'm not sure if the effort (internally subtracting/adding 64 before/after each operation) is worth it. But if someone wants to try it ...
Shouldn't add much. Consider the equivalence to array indexing, when the base index is non-zero. It only has to be implemented at load/store of such a value, just like an array index.