Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

using if statement

$
0
0

Hi

Is there a different way of writing the following code instead of using if statement?

Add $podid

Function Add ($x) {
if ($x -match "07") { do this
} elseif ($x -match "08") { write-host "a"

} elseif ($x -match "09") { write-host "b"

} elseif ($x -match "10") {write-host "c"

} else { do this
}


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>