Micro Focus QTP (UFT) Forums
Difference Between Select Case and If...Else Statement - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Difference Between Select Case and If...Else Statement (/Thread-Difference-Between-Select-Case-and-If-Else-Statement)



Difference Between Select Case and If...Else Statement - MR21135 - 01-19-2009

Can anyone tell me the Difference Between Select Case and If...Else Statement in VBScript.


RE: Difference Between Select Case and If...Else Statement - VENKATAREDDY_M - 01-19-2009

Hi,
If we have Multiple Cases, We will use Select Case Function only.
Though If statement also can perform the same Logic, It need condition for each If, ElseIf part. That means If Condition will start from the first condition waits for the condition and comes to next condition(ElseIf) and waits for the condition there and goes on.

But in Select cases it wont wait.It will directly go to the case.

Hope it's clear

Thanks
VENKATA


RE: Difference Between Select Case and If...Else Statement - MR21135 - 01-20-2009

Hi Venkata,
Thanks a lot for the answer...