Operation 138 is the index limit check of an array element #711
Loading…
Reference in a new issue
No description provided.
Delete branch "sourcerer-l3b"
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?
Operation 138 is the index limit check of an array element
Operation 138 (no operands) was listed as unknown. In the array element
sequence
27 T; 77 8; 76 4; 27 ONE; 52; 27 K; 138; 78 4; 65 W; 32 A 0 TEthe constant K is the dimension minus one on all three public twins
(decimal-fault-report statement 45, K 8 for
dim(9); decimal-sign-report 55,K 18 for
dim(19); OPS cond-not 26, K 4 fordim(5)). The compiler sets theone-based index to the dimension plus one when it is out of range, so the
zero-based index is then K + 1. Operation 138 takes K and the index below it,
signals the array index error when the index is above K, and leaves the index
for
78 4and65 W. Not measured on a host (it is down): the exceptionitself is read from the sequence, not from a run.
rpg_eval_ops.zighas thestep arm (drop K, keep the index; a stack of fewer than two values refuses),
rpg_op138_test.zigstates the K evidence,tools/ops-legend.shreads thearms of
rpg_eval_ops.zigtoo, and docs/OPERATIONS.md lists 138 as class a.Gates
5795bbac9127405c9109