Skip to content

Commit ead8a17

Browse files
committed
use more string interpolators take 2
1 parent 58a70c8 commit ead8a17

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

_ja/tour/basics.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ x = 3 // この記述はコンパイルされません。
6363
val x: Int = 1 + 1
6464
```
6565

66-
型定義では`Int` は識別子`x`の後にくることに注意してください。そして`:`も必要となります。
66+
型定義では`Int` は識別子`x`の後にくることに注意してください。そして`:`も必要となります。
6767

6868
### 変数
6969

@@ -210,15 +210,15 @@ val yetAnotherPoint = Point(2, 2)
210210

211211
```scala mdoc
212212
if (point == anotherPoint) {
213-
println(point + "" + anotherPoint + " は同じです。")
213+
println(s"$point $anotherPoint は同じです。")
214214
} else {
215-
println(point + "" + anotherPoint + " は異なります。")
215+
println(s"$point $anotherPoint は異なります。")
216216
} // Point(1,2) と Point(1,2) は同じです。
217217

218218
if (point == yetAnotherPoint) {
219-
println(point + "" + yetAnotherPoint + " は同じです。")
219+
println(s"$point $yetAnotherPoint は同じです。")
220220
} else {
221-
println(point + "" + yetAnotherPoint + " は異なります。")
221+
println(s"$point $yetAnotherPoint は異なります。")
222222
} // Point(1,2) と Point(2,2) は異なります。
223223
```
224224

_pl/tour/basics.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,15 @@ Są one porównywane przez wartości - _nie_ przez referencje.
220220

221221
```scala mdoc
222222
if (point == anotherPoint) {
223-
println(point + " i " + anotherPoint + " są jednakowe.")
223+
println(s"$point i $anotherPoint są jednakowe.")
224224
} else {
225-
println(point + " i " + anotherPoint + " są inne.")
225+
println(s"$point i $anotherPoint są inne.")
226226
} // Point(1,2) i Point(1,2) są jednakowe.
227227

228228
if (point == yetAnotherPoint) {
229-
println(point + " i " + yetAnotherPoint + " są jednakowe.")
229+
println(s"$point i $yetAnotherPoint są jednakowe.")
230230
} else {
231-
println(point + " i " + yetAnotherPoint + " są inne.")
231+
println(s"$point i $yetAnotherPoint są inne.")
232232
} // Point(1,2) i Point(2,2) są inne.
233233
```
234234

0 commit comments

Comments
 (0)