Swift Compiler Error Arithmetic operation '** ' (on type '**') results in an overflow (溢出運算子'&+')

來源:互聯網
上載者:User

標籤:swift error

Swift Compiler Error Arithmetic operation ‘****** ‘ (on type ‘****‘) results in an overflow 


錯誤碼:




錯誤原因是數值運算中出現溢出情況.其結果超過了UInt8的0~255的範圍. 和OC不同的是預設不允許在運算中數值溢出.但可以使用溢出運算子來運算




著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

Swift Compiler Error Arithmetic operation '** ' (on type '**') results in an overflow (溢出運算子'&+')

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.