Opened 13 years ago

Closed 13 years ago

#1812 closed Bug (No Bug)

AutoItSetOption("MustDeclareVars",1) not working fully

Reported by: Rackbrane Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


Despite the MustDeclareVars option being set to 1, an undeclared variable is allowed when used as a For loop index.

For $Undeclared = 1 to 2
  Send("Echo " & $Undeclared & @CRLF)

Attachments (0)

Change History (3)

comment:1 Changed 13 years ago by BrewmanNH

According to the help file for a For...Next loop:

'The Variable will be created automatically with a LOCAL scope, even when MustDeclareVars is on.

So, it's not a bug, it's a documented feature.

comment:2 Changed 13 years ago by Rackbrane <rogermckenna365@…>

Thanks for your speedy response and apologies for my erroneous report.

comment:3 Changed 13 years ago by Jpm

  • Resolution set to No Bug
  • Status changed from new to closed

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 closed 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.