ForNext
Only Do What Only You Can Do
090. named parameters
Hyperpolyglot C++ Style Languages: C++, Objective C, Java, C# より (2012.05.08)
VBScript
JScript
Perl
PHP
Python
Ruby
PowerShell
Scala
F#
C
C++
none
C++Builder
VC++
C#
added in C# 4.0: static int BMI(int weight, int height) { return (weight * 703) / (height * height); } BMI(weight: 123, height: 64); BMI(height: 64, weight: 123);
Java
none
Objective-C
+(float)weight: (float) w height: (float) h { return (w * 703) / (h * h); } +(float)height: (float) h weight: (float) w { return [BMI weight: w height: h]; } [BMI weight:155 height:70]; [BMI height:70 weight:155];