An array element at a variable index #638
Loading…
Reference in a new issue
No description provided.
Delete branch "rpg-9-ac-array-element-20261025"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
An array element at a variable index
samples(item)compiles to a unit of thirty-one operations: the index widenedto eight bytes in a temporary, a test against the dimension and against zero,
the dimension plus one as the out-of-range value, and the load of the element
at
(index - 1) * widthbytes from the array. No rule read it, so a statementwith an indexed element stayed unresolved, and the array itself, with its
elements stored at constant offsets, was declared as a data structure of
subfields. The value unit
rpg_array_element.zigreads the shape (measured ondecimal-fault-report,decimal-sign-reportandcond-not), the statementreader shows
S264(S258), and the factarray_element_v1tells the sourceemitter the dimension and the element width:
dcl-s samples char(9) dim(9),samples(1) = x'...'for a store at a constant offset,samples(item)forthe variable index. A store into an element at a variable index is another
shape and is still open;
cond-notstays open on itsNOTconditions.Gates
a1ed0085a7de1e2f4b58de1e2f4b58e5d17241a0