Last active
August 29, 2015 14:01
-
-
Save aetos382/01c3215ce91552eef6e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Outer-Func { | |
function Inner-Func { | |
param ($x) | |
"Inner-Func called: $x" | |
} | |
Inner-Func 1 #ここからは呼べる | |
} | |
Outer-Func | |
Inner-Func 2 # ここからは呼べない |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function New-Person { | |
param( | |
[Parameter(Mandatory)] | |
[string] $Name, | |
[Parameter(Mandatory)] | |
[ValidateRange(0, 100)] | |
[int] $Age, | |
[Parameter(Mandatory)] | |
[ValidateSet('Male', 'Female')] | |
[string] $Gender) | |
[PSCustomObject] @{ | |
Name = $Name; | |
Age = $Age; | |
Gender = $Gender; | |
} | |
} | |
$people = @( | |
(New-Person 太郎 28 Male), | |
(New-Person 花子 24 Female), | |
(New-Person リチャード 41 Male), | |
(New-Person メリル 19 Female) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$people = @( | |
@{ Name = '太郎'; Age = 28; Gender = 'Male'; }, | |
@{ Name = '花子'; Age = 24; Gender = 'Female'; }, | |
@{ Neme = 'リチャード'; Age = 41; Gender = 'Male'; }, | |
@{ Name = 'メリル'; Age = 19; Gender = 'Femare'; } | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment