質問編集履歴

1

プログラムの修正

2016/10/07 10:25

投稿

ghana
ghana

スコア18

test CHANGED
File without changes
test CHANGED
@@ -34,28 +34,30 @@
34
34
 
35
35
  ```ここに言語を入力
36
36
 
37
- var coordinatesRectRead[[String]] = [[]]
38
-
39
- var count:Int = 0
37
+ var count:Int = 0
40
38
 
41
39
 
42
40
 
43
- var rowArray:Array = ファイルデータ.components(separatedBy: "\n")
41
+ do{
44
42
 
45
- for row in rowArray{
43
+ var rowArray:Array = ファイルデータ.components(separatedBy: "\n")
46
44
 
47
- let items = row.components(separatedBy: ",")
48
45
 
49
- coordinatesReectRead[count].append(items[0])
50
46
 
51
- coordinatesReectRead[count].append(items[1])
47
+ for row in rowArray{
52
48
 
53
- coordinatesReectRead[count].append(items[2])
49
+ let items = row.components(separatedBy: ",")
54
50
 
55
- coordinatesReectRead[count].append(items[3])
51
+ coordinatesRectRead[count].append(items[0])
56
52
 
57
- count += 1
53
+ coordinatesRectRead[count].append(items[1])
58
54
 
55
+ coordinatesRectRead[count].append(items[2])
56
+
57
+ coordinatesRectRead[count].append(items[3])
58
+
59
+ count += 1
60
+
59
- }
61
+ }
60
62
 
61
63
  ```