![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Using select statements Hello, The MSDN article I found doesn't directly mention this and the example doesn't show it so here's the question. Does VBScript support the ability to use empty case "blocks?" For example, in C I'd do something like: int c; scanf("%d", &c); switch(c) { case 0: // do something important break; case 1: case 2: // do the same thing if c is 1 or 2 break; } Likewise in TCL I'd do something like: gets stdin someInt switch $someInt { 0 { # do something important } 1 - 2 { # do the same thing if someInt is 1 or 2 } } Can I do this in VBScript by simply leaving the Case statement empty/ blank? Thanks, Andy |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Using select statements someint = 2 Select case someint case 0 case 1 case Else MsgBox "1 or 2" end select |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Using select statements I don't know. You'll have to experiment and figure that out. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Dynamic statements? | PowerShell | |||
| test-path and if statements within my foreach loop | PowerShell | |||
| Breaking change in CTP evaluation of statements? | PowerShell | |||
| ADO.Net / Multiple SQL Statements in One Command | .NET General | |||
| Are These Statements True? | Vista installation & setup | |||