Skip to content

fix(codes): split same-address ranges and refuse even TXT sends - #166

Merged
ssweber merged 1 commit into
mainfrom
fix/code-ids
Nov 20, 2026
Merged

ssweber merged 1 commit into
mainfrom
fix/code-ids

Conversation

@ssweber

@ssweber ssweber commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Applies the 2026-11-19 rulings on same-address ranges, OBJ-028 and OBJ-023.

What changes

Same address at both ends

A range such as C1..C1 is now duplicate-address in Coil, Block Copy, Pack, Unpack, Fill and Search. range-not-ascending now means only an end below the start. The exception classes are unchanged.

Fill range ids

Fill ranges now get the ids CLICK answers:

  • OBJ-012 for the same address at both ends, outside SD;
  • OBJ-009 for an end below the start;
  • OBJ-004 for a read-only start SD, refused before the end is read (SD1..SD1, SD2..SD1).

A writable start SD checks the order of its ends first, as the other banks do.

txt-start-not-odd

New code. A Send from an even TXT address, such as TXT1000, is refused with OBJ-028. v0.4.0 accepted it. A Receive into TXT is unchanged.

Fill OBJ-023

A Fill into TXT of a negative integer, or of an integer or hex constant of several digits, keeps constant-out-of-range and now has OBJ-023.

Messages

Each of these refusals now ends with what to write, and the example is one the field accepts.

.code changes for pyrung

Input Before After
Same-address range in Coil, BlockCopy source, Pack source, Unpack dest, Fill dest or Search table range-not-ascending duplicate-address
Fill into SD from a read-only start, with the end at or below the start range-not-ascending / duplicate-address on dest_end not-writable on dest_start, OBJ-004
Send from an even TXT address accepted, or count-out-of-range on Send.quantity txt-start-not-odd on Send.source

Checks

  • make lint, make docs-build and devtools/editor_grids.py --check pass.
  • make test: 19144 passed, 139 skipped.
  • Answer comparisons: CODES_COMPARED goes from 4925 to 4959.
  • Every collected refusal was compared before and after (78,695 before). The only changes are the ones above.
  • A sweep of 23,316 Fills into SD shows no change for a writable start or for an upward range, beyond the rename.

Open, on the roadmap

  • A Receive into TXT from an even address is unanswered, and it is still accepted.
  • Quoted text of several characters into TXT has no OBJ-023. The ruling covers numbers only.
  • A Fill into SD whose end is not an SD address gets no id. CLICK answers OBJ-004.

A range with the same address at both ends, such as C1..C1, is now
duplicate-address in every field: Coil, Block Copy, Pack, Unpack, Fill and
Search. range-not-ascending now means only an end below the start. The ids
stay where they were: OBJ-012 for the same address and OBJ-009 for an end
below. CLICK_IDS lists OBJ-012 under duplicate-address only.

A Fill range outside SD now has these ids too. A Fill into SD from a
read-only start SD is refused as not-writable with OBJ-004 after the pairing,
whatever the order of its ends, so SD1..SD1 and SD2..SD1 are not-writable. A
Fill into SD from a writable start checks the order of its ends first, as the
other banks do, and that refusal has no id. A Fill range in two banks has no
id either.

Each of these refusals now ends with what to write, such as "Write an end
above C1, such as C2." The example skips X and Y numbers outside a slot and
keeps to writable SC bits for a Coil. A refusal of a Fill into SD names a
range of writable SD registers, such as SD31..SD32. address_above and
range_then build the sentence, in operands/address.py.

A Send from an even TXT address, such as TXT1000, is refused with the new
code txt-start-not-odd and OBJ-028, and its count is not checked. The message
names an odd start from which the count ends by TXT1000. A Receive into TXT
is unchanged.

A Fill into TXT of a negative integer, or of an integer or hex constant of
several digits, keeps constant-out-of-range and now has OBJ-023.

CODES_COMPARED goes from 4925 to 4959.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ssweber
ssweber merged commit 72fbfd3 into main Nov 20, 2026
7 checks passed
@ssweber
ssweber deleted the fix/code-ids branch November 20, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant