看瞭之前的學習筆記知道瞭什麼是關鍵字,現在提示各位在Swift 2.0之後增加defer、guard、repeat、catch、rethrows、throw、throws和try關鍵字,其中repeat關鍵字替代do – while循環中的do,即中repeat -while循環。而do關鍵字用於錯誤處理。catch、rethrows、throw、throws和try是錯誤處理關鍵字。
錯誤處理是Swift 2.0之後增加新內容。
只講重點的設計教學,立刻學習網頁教學網誌!
看瞭之前的學習筆記知道瞭什麼是關鍵字,現在提示各位在Swift 2.0之後增加defer、guard、repeat、catch、rethrows、throw、throws和try關鍵字,其中repeat關鍵字替代do – while循環中的do,即中repeat -while循環。而do關鍵字用於錯誤處理。catch、rethrows、throw、throws和try是錯誤處理關鍵字。
錯誤處理是Swift 2.0之後增加新內容。