Repository navigation
TOPOS: generalise CELLTOPOS to convert anything to a packed position - #361
Merged
Merged
Conversation
CELLTOPOS becomes TOPOS, the universal to-position converter: - A1-style address text (sheet prefixes, $ anchors, ranges tolerated) encodes as an absolute position ROW*mult+COLUMN, exactly as before - Any direction spelling DIRDELTA accepts (arrow glyphs, compass codes, screen directions) converts to a relative packed movement delta, repacked as rowDelta*mult+colDelta when a custom mult is supplied - Numbers pass through unchanged, so pre-packed positions, deltas and knight moves survive - Unrecognised text returns #N/A All internal callers (CELLDIST, COLNUM, ROWNUM, GRIDAREA, GRIDLOOKUP, LABELCLUSTERS, MOVECELL, NEIGHBOURS, RELGRID) and help-text mentions are renamed; revision-history lines keep the old name as dated record. Help delimiter switches to broken bar since the help now lists arrow glyphs. Full harness suite green (1234 cases, incl. 33 TOPOS cases). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The letters twin of COLOF: COLSTROF(1200028) returns "AB". Body is pure native-lifting (MOD + ADDRESS + SUBSTITUTE), so array input lifts element-wise with no dispatcher, matching COLOF's shape. Takes the same optional mult as the rest of the pos-decode family. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
taglotacks
approved these changes
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renames CELLTOPOS to TOPOS and generalises it into the universal to-position converter, and adds COLSTROF, the column-letters twin of COLOF.
TOPOS
"E5"; sheet prefixes,$anchors and ranges tolerated) encodes as an absolute packed positionROW*mult+COLUMN— behaviour unchanged from CELLTOPOS.↑ ↗ → ...), compass codes (NE,north-east), screen directions (UL,down) — converts to a relative packed movement delta, repacked asrowDelta*mult+colDeltawhen a custommultis supplied.#N/A. Array input lifts element-wise (branch-plus-@dispatcher retained, incl. the 1x1 arrays poison scalar branches: CELLTOPOS truncates multi-letter columns; FOLDROWS passes 1x1 arrays where REDUCE passes scalars #318 1x1-array guard).The two branches can't collide: direction tokens never contain digits, addresses always do.
COLSTROF
COLSTROF(pos, [mult])extracts the column letters from an encoded position —COLSTROF(1200028)returns"AB"— filling the one gap in the pos-decode family (POSTOCELL gives the full address, ROWOF/COLOF give numbers). Pure native-lifting body (MOD + ADDRESS + SUBSTITUTE), no dispatcher needed.Rename fallout
maps.TOPOS.¦(help content now lists arrow glyphs).Testing
🤖 Generated with Claude Code