溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

IOS中int long longlong的取值范圍是多少

發(fā)布時間:2021-07-26 10:57:36 來源:億速云 閱讀:195 作者:小新 欄目:移動開發(fā)

這篇文章主要介紹了IOS中int long longlong的取值范圍是多少,具有一定借鑒價值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。

IOS下int long longlong的取值范圍

32bit下:

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

64bit下

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

NSObjCRuntime.h文件中:

#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

感謝你能夠認(rèn)真閱讀完這篇文章,希望小編分享的“IOS中int long longlong的取值范圍是多少”這篇文章對大家有幫助,同時也希望大家多多支持億速云,關(guān)注億速云行業(yè)資訊頻道,更多相關(guān)知識等著你來學(xué)習(xí)!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

ios
AI