From ee615b2b3b2b7b336fdd4334dba68801681c9c7b Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 15:11:15 +0000 Subject: fix(parser): accept bare NEXT and read its identifier only from the same line Co-Authored-By: Claude Sonnet 5.5 --- doc/language/keyword/cpsc-keyword-for.7.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/language/keyword/cpsc-keyword-for.7.md b/doc/language/keyword/cpsc-keyword-for.7.md index e278cd9..0a4e5c7 100644 --- a/doc/language/keyword/cpsc-keyword-for.7.md +++ b/doc/language/keyword/cpsc-keyword-for.7.md @@ -9,12 +9,12 @@ cpsc-keyword-for, cpsc-keyword-to, cpsc-keyword-step, cpsc-keyword-next - iterat ```text FOR variable <- start TO finish [STEP increment] statements -NEXT variable +NEXT [variable] ``` # DESCRIPTION -The loop variable must already be declared INTEGER. Both endpoints are inclusive. STEP defaults to 1; use a negative value to count down. STEP is evaluated once, while the finish expression is evaluated each iteration. NEXT must name the same variable. Use a nonzero STEP. TO, STEP, and NEXT belong to this syntax. +The loop variable must already be declared INTEGER. Both endpoints are inclusive. STEP defaults to 1; use a negative value to count down. STEP is evaluated once, while the finish expression is evaluated each iteration. The variable after NEXT is optional. If present, it must be on the same line as NEXT and name the loop variable. Use a nonzero STEP. TO, STEP, and NEXT belong to this syntax. # EXAMPLE -- cgit v1.3.1-4-g156e