多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## Basic Operators Unlike C, Swift lets you perform remainder (%) calculations on floating-point numbers. ~~~ if x = y { // this is not valid, because x = y does not return a value } // Swift中的取模操作 -9 % 4 // equals -1,理解成:-9 = (4 × -2) + -1 ~~~ Swift also provides two identity operators (=== and !==), which you use to test whether two object references both refer to the same object instance ~~~ // ??? var arr1 = [1, 2, 3] var arr2 = arr1 arr2[0] = 10; arr1 // [10, 2, 3] arr2 // [10, 2, 3] arr1 === arr2 // 修改arr2,arr1也跟着修改,所以应该是指向一个object,这里应该是true,但结果却是false ~~~