My apologies if this is not the correct place to put up this question, but i saw that the PowerShell section is archived now, so had to put in here.
I am very new to the Powershell programing and trying out a very simple thing but failing.
Situation : for some code I am trying to compare two different integer values and getting the wrong result, below is the simulated code for :
************************************
[int] $a=5
[int] $b=3
if($a > $b)
{write-host "working"}
else
{write-host "not working"}
************************************
Now my problem is that when i press enter it prints "not working", which would mean that value b> value a, which is incorrect. Am I going wrong somewhere?
Please help.
Thanks
I am very new to the Powershell programing and trying out a very simple thing but failing.
Situation : for some code I am trying to compare two different integer values and getting the wrong result, below is the simulated code for :
************************************
[int] $a=5
[int] $b=3
if($a > $b)
{write-host "working"}
else
{write-host "not working"}
************************************
Now my problem is that when i press enter it prints "not working", which would mean that value b> value a, which is incorrect. Am I going wrong somewhere?
Please help.
Thanks