Menu ▾ ▴

#3 FILL cannot be used as an object label (PT2AX, PT2AY)

1.0
open
2026-11-13
2026-11-13
No

FILL cannot be used as an object label. Tests PT2AX and PT2AY stop with:

Input Error array to fill not found  FILL R 0.1 0.1 0.3 0.15

The other opcodes work as labels: with the FILL line removed, PT2AX and PT2AY run correctly and CT changes the 2R, 2G, 2N and 2S objects as expected.

Cause: a label is a name starting in column one (strObjName, P.java ~1482). Each command branch checks strObjName == null before treating the first word as a command; the FILL branch (P.java line 2344) was added later and lacks that check.

Proposed fix (tested: PT2AX and PT2AY pass; not applied in 2026.11 so the release ships the code as tested):

--- a/afn/P.java
+++ b/afn/P.java
@@ -2341,7 +2341,7 @@
                    Debug.P("an ["+ XX+"] = " + an.A[XX]);
                    V.addElement(an);
                }

-               if (FirstTokenUpperCase.equals("FILL")) {
+               if (strObjName == null && FirstTokenUpperCase.equals("FILL")) {
                    S = st.nextToken(); // array name

Discussion


Log in to post a comment.