Do NSDouble, NSFloat, or other types than NSInteger exist?

后端 未结 3 1441
北海茫月
北海茫月 2020-12-29 19:46

Over at In Cocoa do you prefer NSInteger or just regular int, and why?, there was mention of NSDouble and NSFloat, but I can\'t see a reference for

3条回答
  •  孤城傲影
    2020-12-29 20:06

    NSInteger exists because the int type varies in size between 32-bit and 64-bit systems. float and double don't vary in size the same way, so there's no need to have wrapper types for them.

提交回复
热议问题