Modify

Opened 14 years ago

Closed 14 years ago

#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, 14 years ago

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

comment:2 by Valik, 14 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.