Opened 20 months ago

Last modified 20 months ago

#3859 new Feature Request

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:


Something like this:

Opt('MustDeclareVars', 1)
For Local $i = 1 To 3
  ConsoleWrite($i) ; prints "123"
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 (2)

comment:1 Changed 20 months ago by TicketCleanup

  • Version deleted

Automatic ticket cleanup.

comment:2 Changed 20 months ago by Melba23

Can you please give an example where such a functionality would be useful or where the current implementation causes a serious problem.


Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as new The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.