rpg_display.zig, rpg_statements.zig and rpg_source_stmt.zig: DSPLY of %CHAR of a numeric field, and the source of %DEC(%CHAR(I)) and %INT(%CHAR(I)) #769
Loading…
Reference in a new issue
No description provided.
Delete branch "lo15e"
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?
rpg_display.zig, rpg_statements.zig and rpg_source_stmt.zig: DSPLY of %CHAR of a numeric field, and the source of %DEC(%CHAR(I)) and %INT(%CHAR(I))
dsply %char(n)(probelo15-char-dsply, statement 22) is a whole-statement proof ofrpg_display.recover, which read fields and literals as the message and stopped atstagedAddresson the first operation of the strip. The profile of the tokensrpg_display.recover s04,take s02,readDescriptor s01,stagedAddress s01withrpg_trim.charConcat s01is this statement.rpg_display.charsMessagereads the load of theinteger and its zoned conversion (
29 I 0 T; [75 4]; 86 D; 61 D 0 0; 85 D 1), the 59operations of the strip (
rpg_trim.stripShape, with the labels proved to have no jump fromoutside) and the load of the pointer of the digits. The first descriptor then stores that
pointer and, for its length, the temporary of the strip in place of a constant width (the
buffer width D + 1 is the bound). The proof has
chars;rpg_display.namedwrites the message as%CHAR(I)(one existing line ofrpg_statements.zigchanged, net growth 0):DSPLY %CHAR(S260).The queue and the response are read as before. Only the message of a DSPLY with an integer
field of the static storage is read; other built-in results are not covered by this unit.
DSPLY of %CHAR of a packed, zoned or unsigned field
The tracer gave
rpg_display.charsMessage s01(the source symbol) on the held-out line and on thecaptures of
lo15/dsp-charwith a packed, a zoned and a packed-decimal field; the integer fieldsint(5),int(10),int(20)and the queue operand already read. The load before the strip differsby the type of the field and nothing else:
29 I 0 T; [75 4]; 86 D(integer),88 D(unsigned),84 D 1(zoned) or no conversion (packed), then61 D 0 0; 85 D 1.charsMessagereads the fourforms; the source must be a static field whose type has the width of the field (a packed field has its
digits as its length and the type the bytes).
lo15-dsp-packed,-zoned,-unsand-queueareadopted (statement 16 of each).
packed(7:2)(lo15-dsp-packed-dec) is not read: its strip insertsthe decimal point (two copies), and
rpg_trim.stripShaperefuses it (charsMessage s04).The emitter: %DEC(%CHAR(I): D: S) and %INT(%CHAR(I))
The
lo15-char-decandlo15-char-int-ofprobes recover but their emit failed(
runtime or packed template statement:_QRNX_GET_DECIMAL_NUMwith a temporaryas its source,
ADDRESS(A313.0, 11)).rpg_source_stmt.runtimeSummarydemanded adate conversion call for every
%CHAR(of the assignment. A decimal call with no datecall (
digits_only) has no such call, and the%CHAR(is the digits of an integer: thesummary is now
S261 = %DEC(%CHAR(S260): 7: 0). Date conversions are unchanged.Lane Lo15: open and negative items
Not done, with the check that still declines:
%SCAN(lit: %CHAR(n))(lo15-char-scan): the strip and the source text are read, butrpg_eval_builtins.scantakes constant lengths only (s06), the last call argument is-2147483648 where it is 0 for a field (unmeasured), and the check of the result after the call
(
27 T; 27 C; 10; 17 L; ... 99 3, error signal) has no reader.DSPLYof%CHARof a data structure subfield, of an array element and of an expression(
lo15-dsp-ds-sub,-arr-const,-arr-var,-expr,-packed-dec): the load before the strip is not29 I 0 T(33 DS; 27 K; 62; 32,34 A 0; 27 K; 62; 32, a computed value, and a second61),so
rpg_display.charsMessagedeclines (s02for the expression).%CHARof integer, unsigned, zonedand packed fields is read;
packed(7:2)is not (the strip inserts the decimal point).%LEFTand%RIGHTwith a variable length,%SUBSTwith a variable start and a variablecount,
%REPLACE,%CHECK,%CHECKR,%LOOKUPand%SQRT: no unit reads their range checks.%CHARstrip into a character field whose width is less than the digits (aminblockwith a data structure target) and
R.c = %trimr(G),R.b = %trim(C)(h-subfill statements34 and 64): the copy head of
copyTailstackedmode may read them; not measured.rpg_evalop 32 reads a part of a field at byte 0(
fieldValue) as the whole field. A copy of fewer bytes than the field to a wider target printsas
S = C.%LEFTand%RIGHTavoid it by owning the typed copy; any other reader of a partialread at byte 0 meets it.
96975b34965be4b586e3