rpg_trim.zig, rpg_decimal_call.zig and rpg_eval_builtins.zig: %CHAR of an integer as the argument of %LEN, a condition, %DEC and %INT (operation 15) #767

Manually merged
binjovi-bot merged 3 commits from lo15d into trunk 2026-11-08 16:22:55 +00:00
Owner

rpg_trim.zig, rpg_decimal_call.zig and rpg_eval_builtins.zig: %CHAR of an integer as the argument of %LEN, a condition, %DEC and %INT (operation 15)

The tracer showed rpg_trim.charConcat s01 (fewer than 27 operations follow the
strip of %CHAR(I)) in six of the twenty public cases of the battery
lo15/char-consumers (captures lo15-char-*): %len(%char(n)) and the same in
a condition (char-in-if-len), %dec(%char(n): 7: 0), %int(%char(n)), %scan('7': %char(n)) and
dsply %char(n). Four now recover; the probes are adopted (lo15-char-len,
-char-in-if-len, -dec, -int-of, statement 22 of each).

  • %LEN(%CHAR(I)): after the strip 27 P; 3; 27 N2 drops the pointer and loads
    the length; the value is %LEN(%CHAR(I)).
  • %DEC and %INT of the digits: 27 P; 113 q 1; 27 N2 is the source of the
    _QRNX_GET_DECIMAL_NUM call. rpg_trim.stripShape (the strip as a pure shape, shared
    with charStrip) proves the 59 operations; rpg_decimal_call.charSource finds
    the same unit before the call and takes it as the source (as for %TRIM), with
    the labels of the strip proved to have no other jump. The text is
    %DEC(%CHAR(S260): 7: 0) and %INT(%CHAR(S260)).

Still open: %SCAN('7': %char(n)) (rpg_eval_builtins.scan s06: the length of the
source is the temporary N2, scan reads constants only) and dsply %char(n) (the
display proof reads fields). Adopting the four probes adds four matrix rows.

# rpg_trim.zig, rpg_decimal_call.zig and rpg_eval_builtins.zig: %CHAR of an integer as the argument of %LEN, a condition, %DEC and %INT (operation 15) The tracer showed `rpg_trim.charConcat s01` (fewer than 27 operations follow the strip of `%CHAR(I)`) in six of the twenty public cases of the battery `lo15/char-consumers` (captures `lo15-char-*`): `%len(%char(n))` and the same in a condition (`char-in-if-len`), `%dec(%char(n): 7: 0)`, `%int(%char(n))`, `%scan('7': %char(n))` and `dsply %char(n)`. Four now recover; the probes are adopted (`lo15-char-len`, `-char-in-if-len`, `-dec`, `-int-of`, statement 22 of each). - `%LEN(%CHAR(I))`: after the strip `27 P; 3; 27 N2` drops the pointer and loads the length; the value is `%LEN(%CHAR(I))`. - `%DEC` and `%INT` of the digits: `27 P; 113 q 1; 27 N2` is the source of the `_QRNX_GET_DECIMAL_NUM` call. `rpg_trim.stripShape` (the strip as a pure shape, shared with `charStrip`) proves the 59 operations; `rpg_decimal_call.charSource` finds the same unit before the call and takes it as the source (as for `%TRIM`), with the labels of the strip proved to have no other jump. The text is `%DEC(%CHAR(S260): 7: 0)` and `%INT(%CHAR(S260))`. Still open: `%SCAN('7': %char(n))` (`rpg_eval_builtins.scan s06`: the length of the source is the temporary N2, `scan` reads constants only) and `dsply %char(n)` (the display proof reads fields). Adopting the four probes adds four matrix rows.
binjovi-bot manually merged commit 1ac95a27a7 into trunk 2026-11-08 16:22:55 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/sourcerer!767
No description provided.