Skip to content

Clarify o-code numbering and scoping rules in docs#3891

Merged
andypugh merged 1 commit intoLinuxCNC:masterfrom
grandixximo:issue-3880-fix
Mar 31, 2026
Merged

Clarify o-code numbering and scoping rules in docs#3891
andypugh merged 1 commit intoLinuxCNC:masterfrom
grandixximo:issue-3880-fix

Conversation

@grandixximo
Copy link
Copy Markdown

Document that control flow o-words (if/while/do/repeat) are locally scoped to their subroutine and can be safely reused across different subroutines, while subroutine definitions are global and must be unique. Add example showing valid reuse of o-numbers across subs.

Ref: #3880

I think after this the issue can be closed, the docs are much clearer, the issue was more about docs than anything, but proper errors also help.

Document that control flow o-words (if/while/do/repeat) are locally
scoped to their subroutine and can be safely reused across different
subroutines, while subroutine definitions are global and must be
unique. Add example showing valid reuse of o-numbers across subs.

Ref: LinuxCNC#3880
@andypugh andypugh merged commit 6dd95e9 into LinuxCNC:master Mar 31, 2026
14 checks passed
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.

2 participants