Modify

#2129 closed Bug (No Bug)

Incorrect Switch .. Case Else EndSwitch parsing

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

Description

Executing this code causes ignoring all next Case statements after nested Case Else

$sSource	= 'Get7zBeginOffset'
$iError		= 1
$Result		= "Bad choice"

Select
	Case StringCompare ($sSource, "GetSFXEndOffset") = 0
		Switch $iError
			Case -1
				$Result = "-1"
			Case 1
				$Result = "1"
		EndSwitch

	Case StringCompare ($sSource, "GetMSIVersionInfo") = 0
		Switch $iError
			Case -1
				$Result = "-1"
			Case Else
				$Result = "~"
		EndSwitch

	Case StringCompare ($sSource, "Get7zBeginOffset")
		Switch $iError
			Case -1
				$Result = "-1"
			Case 1
				$Result = "1"
		EndSwitch

	Case StringCompare ($sSource, "ImportVersionInfo") = 0
		Switch $iError
			Case -1
				$Result = "-1"
			Case 1
				$Result = "1"
			Case 2,3
				$Result = "2,3"
		EndSwitch

EndSelect

ConsoleWrite ($Result & @CR)

Attachments (0)

Change History (2)

in reply to:  description comment:1 by anonymous, on Feb 7, 2012 at 9:22:15 PM

sorry, seems to be my mistake, needs to close or delete this ticket

comment:2 by Valik, on Feb 8, 2012 at 3:49:07 AM

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.