源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

详解 IOS下int long longlong的取值范围

  • 时间:2022-07-07 12:59 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:详解 IOS下int long longlong的取值范围
[b]详解 IOS下int long longlong的取值范围[/b] [b]32bit下:[/b]
unsigned int 0~4294967295 
int -2147483648~2147483647 
unsigned long 和int一样
long 和int一样
long long的最大值:9223372036854775807
long long的最小值:-9223372036854775808
unsigned long long的最大值:1844674407370955161
__int64的最大值:9223372036854775807
__int64的最小值:-9223372036854775808
unsigned __int64的最大值:18446744073709551615



[b]64bit下[/b]
unsigned int 0~4294967295 
int -2147483648~2147483647 
unsigned long 和 unsigned long long一样
long 和long long一样
long long的最大值:9223372036854775807
long long的最小值:-9223372036854775808
unsigned long long的最大值:1844674407370955161
__int64的最大值:9223372036854775807
__int64的最小值:-9223372036854775808
unsigned __int64的最大值:18446744073709551615

[b]NSObjCRuntime.h文件中:[/b]
#ifndef _OBJC_NSOBJCRUNTIME_H_
#define _OBJC_NSOBJCRUNTIME_H_
#include <TargetConditionals.h>
#include <objc/objc.h>
#if __LP64__ || (TARGET_OS_EMBEDDED && !TARGET_OS_IPHONE) || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64
typedef long NSInteger;
typedef unsigned long NSUInteger;//64bit下NSInteger的取值范围就是long==long long
#else
typedef int NSInteger;
typedef unsigned int NSUInteger;//32bit下NSInteger的取值范围就是int==long
#endif
#define NSIntegerMax  LONG_MAX
#define NSIntegerMin  LONG_MIN
#define NSUIntegerMax  ULONG_MAX
#define NSINTEGER_DEFINED 1
#endif

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部