Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Inverted-syntax/PowerShell/inverted-syntax-1.psh
Normal file
1
Task/Inverted-syntax/PowerShell/inverted-syntax-1.psh
Normal file
|
|
@ -0,0 +1 @@
|
|||
if ((Get-Date 5/27/2016).DayOfWeek -eq "Friday") {"Thank God it's Friday!"}
|
||||
8
Task/Inverted-syntax/PowerShell/inverted-syntax-2.psh
Normal file
8
Task/Inverted-syntax/PowerShell/inverted-syntax-2.psh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
function Action ([scriptblock]$Expression, [Alias("if")][bool]$Test)
|
||||
{
|
||||
if ($Test) {&$Expression}
|
||||
}
|
||||
|
||||
Set-Alias -Name say -Value Action
|
||||
|
||||
say {"Thank God it's Friday!"} -if (Get-Date 5/27/2016).DayOfWeek -eq "Friday"
|
||||
Loading…
Add table
Add a link
Reference in a new issue