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

留言

這個網誌中的熱門文章

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

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

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

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

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

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

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

app bundle and bundletool. 關於aab安裝問題

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

Google Play badge徽章產生器