summaryrefslogtreecommitdiffhomepage
path: root/powershell.html.markdown
diff options
context:
space:
mode:
authorAndrew Ryan Davis <AndrewDavis1191@gmail.com>2020-08-20 12:26:48 -0700
committerAndrew Ryan Davis <AndrewDavis1191@gmail.com>2020-08-20 12:30:32 -0700
commitd221d56c60e83fa2dbec3c8ce3a903e20bf04d23 (patch)
tree830572364a58659db315f77ea88c43c37ad2608e /powershell.html.markdown
parentb46242c13882ec41d8ea0f8ae3aa3b867d0c47e1 (diff)
Adjusting last items before land
Diffstat (limited to 'powershell.html.markdown')
-rw-r--r--powershell.html.markdown7
1 files changed, 4 insertions, 3 deletions
diff --git a/powershell.html.markdown b/powershell.html.markdown
index 42a8338f..32d2e667 100644
--- a/powershell.html.markdown
+++ b/powershell.html.markdown
@@ -51,7 +51,8 @@ Powershell as a Language:
[int]-5 / [int]3 # => -1.66666666666667
5.0 / 3.0 # => 1.66666666666667
-5.0 / 3.0 # => -1.66666666666667
-[int]$result = 5 / 3 # => 2
+[int]$result = 5 / 3
+$result # => 2
# Modulo operation
7 % 3 # => 1
@@ -716,8 +717,8 @@ C:\Program Files\dotnet\dotnet.exe # returns string rather than execute
# One usage of '&' would be to invoke a scriptblock inside of your script.
# Notice the variables are scoped
$i = 2
-$scriptblock = { $i=5; Write-Output $i }
-& $scriptblock # => 5
+$scriptBlock = { $i=5; Write-Output $i }
+& $scriptBlock # => 5
$i # => 2
invoke-expression ' $i=5; Write-Output $i ' # => 5