Open L2jLiga opened 3 months ago
As far as I know there is no ternary operator in powershell
Thanks @ZeArioch to point me the documentation : https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_if?view=powershell-7.4#using-the-ternary-operator-syntax
The example you provide is not supported by Powershell, only ternary operator is allowed following a parenthesis expression... Ok I will try to fix this issue. Thanks @L2jLiga !
Thanks @ZeArioch to point me the documentation : https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_if?view=powershell-7.4#using-the-ternary-operator-syntax
Sorry, I totally forgot to provide link to the documentation 😅
The example you provide is not supported by Powershell, only ternary operator is allowed following a parenthesis expression... Ok I will try to fix this issue. Thanks @L2jLiga !
That's actually weird because I've checked provided example in powershell 7.4.4 on Windows 11 in Windows Terminal:
┏[ user from DESKTOP-JRVT494][ 0.196s][kubernetes-super-admin@kubernetes]
┖[~]
└─Δ $variable=$true ?1:0
┏[ user from DESKTOP-JRVT494][ 0s][kubernetes-super-admin@kubernetes]
┖[~]
└─Δ echo $variable
1
Hello, I've noticed that parser unable to work with ternary expression, could you fix this please?
input:
output: