Swift: C-style for statement has been removed in Swift 3

Swift error: C-style for statement has been removed in Swift 3:


let t1=60


solution:

let t1=60

for i in stride(from:0, through:t1,by: 5)
{
    print("\(i)")
}

output:
0
5
10
15
20
25
30
35
40
45
50
55
60

or

let t1=60

for i in stride(from:0, to:t1, by: 5)
{
    print("\(i)")
}

output: 
0
5
10
15
20
25
30
35
40
45
50
55

留言

這個網誌中的熱門文章

更改google drive預設存放目錄位置Change Google Drive Default Folder Location in Windows

最爛的銀行服務-玉山銀行

ios app 上架時app icon要注意事項

SMR疊瓦式hdd致命缺陷被解決????!!!

app廣告營利: 該選擇admob 或是 Facebook Audience Network?

google play 正式發布前測試報告...非常好用.

寫APP真的是好工作嗎? Firebase host與我對Kotlin的感想

舊有app在Android 12 閃退問題& app Splash screens

關於google play console app應用程式簽署

Mark App Design Apps - Terms and Privacy Policy (服務條款,隱私權政策)