Modify ↓
#3859 closed Feature Request (Rejected)
Extend For…Next syntax to force loop variable to be local within the loop only
| Reported by: | Alecsis1 | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | Severity: | None | |
| Keywords: | Cc: |
Description
Something like this:
Opt('MustDeclareVars', 1)
For Local $i = 1 To 3
ConsoleWrite($i) ; prints "123"
Next
ConsoleWrite($i) ; now prints "4", but with "Local" modifier should be treated as "undeclared variable"
Imho, such syntax extension may be useful.
Attachments (0)
Change History (3)
comment:1 by , on Jan 21, 2022 at 6:00:01 PM
| Version: | 3.3.14.5 |
|---|
comment:2 by , on Jan 22, 2022 at 10:48:56 AM
Can you please give an example where such a functionality would be useful or where the current implementation causes a serious problem.
M23
comment:3 by , on Mar 19, 2024 at 10:48:43 PM
| Resolution: | → Rejected |
|---|---|
| Status: | new → closed |
As no example was given,
I assume it is not so important so I close it
If you find a good example just reopen a new ticket
Note:
See TracTickets
for help on using tickets.

Automatic ticket cleanup.