-
Notifications
You must be signed in to change notification settings - Fork 1
02 variables
Steve Perry edited this page Nov 22, 2015
·
1 revision
View the source code
Run:
hello-world.ps1
Demonstrates declaring and manipulating variables.
Variable names begin with a dollar sign.
Varaibles are objects (I think), so you can call their methods and get their properties.
Here's an instance of the Int32 structure:
$n = 5
$n.GetTypeCode()
Int32
$n.Equals(6)
False
Here's an instance of the String clsss:
$s = "Steve"
$s.Length
5
Here's an instance of the Double structure:
8.3.GetTypeCode()
Double
Constants aqre objects too (I think).
"Edward".Length
6
(5).GetTypeCode()
Int32