Created
August 19, 2011 13:32
-
-
Save mcamou/1156792 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
mario@tumbolia ~ 1 % scala | |
Welcome to Scala version 2.9.0.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> def x(a:Int,b:Int,c:Int,d:Int = 0) = println(a,b,c,d) | |
x: (a: Int, b: Int, c: Int, d: Int)Unit | |
scala> x(a=1,b=2,c=3) | |
(1,2,3,0) | |
scala> x(z=0,a=1,b=2,c=3) | |
<console>:9: error: parameter specified twice: a | |
x(z=0,a=1,b=2,c=3) | |
^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment