Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Comparing number values

$
0
0

I need PS to compare a true whenever it finds a value in range of another value. For example on the second line down it falls within range of the first one. When I use compareTo it doesn't seem to work is there another method for this or does it have to count in order to work out?

$a = 1 + (256 * 0) + (256 * 256 * 168) + (256 * 256 * 256 * 192)

$b = 10 + (256 * 0) + (256 * 256 * 168) + (256 * 256 * 256 * 192)

$c = $a,  $b

Write-Host $c 

$x = 4 + (256 * 0) + (256 * 256 * 168) + (256 * 256 * 256 * 192)

$y = 8 + (256 * 0) + (256 * 256 * 168) + (256 * 256 * 256 * 192)

$z = $x, $y

Write-Host $z



32322355213232235530
32322355243232235528
177733988177733998
323223553532322355



Viewing all articles
Browse latest Browse all 21975

Trending Articles



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