summaryrefslogtreecommitdiffhomepage
path: root/de-de/swift-de.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'de-de/swift-de.html.markdown')
-rw-r--r--de-de/swift-de.html.markdown14
1 files changed, 7 insertions, 7 deletions
diff --git a/de-de/swift-de.html.markdown b/de-de/swift-de.html.markdown
index c21b7e36..08f72a35 100644
--- a/de-de/swift-de.html.markdown
+++ b/de-de/swift-de.html.markdown
@@ -467,23 +467,23 @@ print("Name: \(BookName.john.rawValue)")
// Enum mit assoziierten Werten
enum Furniture {
// mit Int assoziiert
- case Desk(height: Int)
+ case desk(height: Int)
// mit String und Int assoziiert
- case Chair(String, Int)
-
+ case chair(String, Int)
+
func description() -> String {
switch self {
- case .Desk(let height):
+ case .desk(let height):
return "Desk with \(height) cm"
- case .Chair(let brand, let height):
+ case .chair(let brand, let height):
return "Chair of \(brand) with \(height) cm"
}
}
}
-var desk: Furniture = .Desk(height: 80)
+var desk: Furniture = .desk(height: 80)
print(desk.description()) // "Desk with 80 cm"
-var chair = Furniture.Chair("Foo", 40)
+var chair = Furniture.chair("Foo", 40)
print(chair.description()) // "Chair of Foo with 40 cm"