|
|
=={{header|PowerShell}}==
<lang powershell>2008..2121 | Where-Object { (Get-Date $_-12-25).DayOfWeek -eq "Sunday" }</lang>
<lang powershell>function StepUp
{
If ( -not ( Step ) )
{
StepUp
StepUp
}
}
# Step simulator for testing
function Step
{
If ( Get-Random 0,1 )
{
$Success = $True
Write-Verbose "Up one step"
}
Else
{
$Success = $False
Write-Verbose "Fell one step"
}
return $Success
}
# Test
$VerbosePreference = 'Continue'
StepUp</lang>
{{out}}
<pre>VERBOSE: Fell one step
VERBOSE: Fell one step
VERBOSE: Up one step
VERBOSE: Fell one step
VERBOSE: Fell one step
VERBOSE: Up one step
VERBOSE: Up one step
VERBOSE: Up one step
VERBOSE: Fell one step
VERBOSE: Up one step
VERBOSE: Up one step</pre>
=={{header|Protium}}==
|