Modify

Opened 14 years ago

Closed 14 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 Changed 14 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 14 years ago by Rackbrane <rogermckenna365@…>

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

comment:3 Changed 14 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

Action
as closed The ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.