[swift-users] what's ^ operator for

Mr Bee pak.lebah at yahoo.com
Sun Sep 18 07:41:12 CDT 2016


Hi all, I wrote this in XCode Playground…
let i = 2^2print(i)
It runs fine without any errors and print 0, while I expect it to print 4 from 2 power by 2 or 2². Swift ebook and even Google gave me nothing on this.
What did I miss?
Thank you.
Regards,
–Mr Bee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160918/8ffbb1df/attachment.html>


More information about the swift-users mailing list