Modify

Opened 15 years ago

Closed 15 years ago

#1812 closed Bug (No Bug)

AutoItSetOption("MustDeclareVars",1) not working fully

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

Description

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

AutoItSetOption("MustDeclareVars",1)
For $Undeclared = 1 to 2
  Send("Echo " & $Undeclared & @CRLF)
Next

Attachments (0)

Change History (3)

comment:1 by BrewmanNH, 15 years ago

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 by Rackbrane <rogermckenna365@…>, 15 years ago

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

comment:3 by J-Paul Mesnage, 15 years ago

Resolution: No Bug
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.