Skip to content

Fix DATA replacement and WHILE branch state - #105

Open
dajiaohuang wants to merge 3 commits into
richpl:masterfrom
dajiaohuang:fix-data-and-while-jumps
Open

dajiaohuang wants to merge 3 commits into
richpl:masterfrom
dajiaohuang:fix-data-and-while-jumps

Conversation

@dajiaohuang

@dajiaohuang dajiaohuang commented Oct 4, 2026 •

Copy link
Copy Markdown

Fixes #103 and #104.

When replacing a stored DATA line with another statement, remove the old DATA entry. Numeric jumps preserve active WHILE frames when the target remains inside their matching loop and discard frames the target exits.

Also clear WHILE execution frames at the start of RUN. After STOP inside a WHILE loop and editing its paired lines, RUN must not reuse an obsolete frame. Added a regression that restarts the edited program and checks its output.

Validation:

  • Current exact candidate: python -B -m unittest -v test_program — 5 tests passed on Windows.
  • Earlier unchanged flowsignal.py doctests — 6 passed; result reused, not rerun for this revision.

No hosted CI or broader platform acceptance claimed.

This branch has not been deployed

No deployments
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.

Replacing a DATA line leaves its values available to READ

1 participant