Allows equality comparison.
Allows most equality comparison using double equals (==).
Many languages support this syntax. PowerShell does not.
This transpiler enables equality comparison with ==.
EXAMPLE 1
Invoke-PipeScript -ScriptBlock {
$a = 1
if ($a == 1 ) {
"A is $a"
}
}EXAMPLE 2
{
$a == "b"
} | .>PipeScriptThe original assignment statement.
| Type | Required | Position | PipelineInput |
|---|---|---|---|
[AssignmentStatementAst] |
true | 1 | true (ByValue) |
This will not work if there is a constant on both sides of the expression
if ($null == $null) { "this will work"} if ('' == '') { "this will not"}
EqualityComparison [-AssignmentStatementAST] <AssignmentStatementAst> [<CommonParameters>]