32位int取值范围_正则表达式判断是否是int32

32位int取值范围_正则表达式判断是否是int32在做游戏的开发中,由于游戏运行的时间已经很长,数据量

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

在做游戏的开发中,由于游戏运行的时间已经很长,数据量非常大,在内网测试,怎么测都没有问题,可是到外网就是时不时的挂了,后来打log才看出问题。是我的int类型范围设置小聊,数据较到,应该用__int64,我却用int32,超出范围。。。。

C:\Program Files\Borland\CBuilder6\Include\stdint.h
/*  stdint.h

    Integer types – c99 7.18
*/

/*
 *      C/C++ Run Time Library – Version 11.0
 *
 *      Copyright (c) 2002 by Borland Software Corporation
 *      All Rights Reserved.
 *
 */


#ifndef __STDINT_H
#define __STDINT_H

/* 7.18.1.1 Exact-width integer types */

typedef __int8 int8_t;
typedef __int16 int16_t;
typedef __int32 int32_t;
typedef __int64 int64_t;

typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;



/* 7.18.1.2 Minimum-width integer types */

typedef __int8 int_least8_t;
typedef __int16 int_least16_t;
typedef __int32 int_least32_t;
typedef __int64 int_least64_t;

typedef unsigned __int8 uint_least8_t;
typedef unsigned __int16 uint_least16_t;
typedef unsigned __int32 uint_least32_t;
typedef unsigned __int64 uint_least64_t;



/* 7.18.1.3 Fastest minimum-width integer types */

typedef __int8 int_fast8_t;
typedef __int16 int_fast16_t;
typedef __int32 int_fast32_t;
typedef __int64 int_fast64_t;

typedef unsigned __int8 uint_fast8_t;
typedef unsigned __int16 uint_fast16_t;
typedef unsigned __int32 uint_fast32_t;
typedef unsigned __int64 uint_fast64_t;



/* 7.18.1.4 Integer types capable of holding object pointers */

typedef int32_t intptr_t;
typedef uint32_t uintptr_t;



/* 7.18.1.5 Greatest-width integer types */

typedef int64_t intmax_t;
typedef uint64_t uintmax_t;



/* 7.18.2.1 Limits of exact-width integer types */

#define INT8_MIN ((int8_t) -128)
#define INT16_MIN ((int16_t) -32768)
#define INT32_MIN ((int32_t) -2147483648)
#define INT64_MIN ((int64_t) -9223372036854775808)

#define INT8_MAX ((int8_t) 127)
#define INT16_MAX ((int16_t) 32767)
#define INT32_MAX ((int32_t) 2147483647)
#define INT64_MAX ((int64_t) 9223372036854775807)

#define UINT8_MAX ((uint8_t) 255)
#define UINT16_MAX ((uint16_t) 65535)
#define UINT32_MAX ((uint32_t) 4294967295)
#define UINT64_MAX ((uint64_t) 18446744073709551615)



/* 7.18.2.2 Limits of minimum-width integer types */

#define INT_LEAST8_MIN ((int_least8_t) -128)
#define INT_LEAST16_MIN ((int_least16_t) -32768)
#define INT_LEAST32_MIN ((int_least32_t) -2147483648)
#define INT_LEAST64_MIN ((int_least64_t) -9223372036854775808)

#define INT_LEAST8_MAX ((int_least8_t) 127)
#define INT_LEAST16_MAX ((int_least16_t) 32767)
#define INT_LEAST32_MAX ((int_least32_t) 2147483647)
#define INT_LEAST64_MAX ((int_least64_t) 9223372036854775807)

#define UINT_LEAST8_MAX ((uint_least8_t) 255)
#define UINT_LEAST16_MAX ((uint_least16_t) 65535)
#define UINT_LEAST32_MAX ((uint_least32_t) 4294967295)
#define UINT_LEAST64_MAX ((uint_least64_t) 18446744073709551615)



/* 7.18.2.3 Limits of fastest minimum-width integer types */

#define INT_FAST8_MIN ((int_fast8_t) -128)
#define INT_FAST16_MIN ((int_fast16_t) -32768)
#define INT_FAST32_MIN ((int_fast32_t) -2147483648)
#define INT_FAST64_MIN ((int_fast64_t) -9223372036854775808)

#define INT_FAST8_MAX ((int_fast8_t) 127)
#define INT_FAST16_MAX ((int_fast16_t) 32767)
#define INT_FAST32_MAX ((int_fast32_t) 2147483647)
#define INT_FAST64_MAX ((int_fast64_t) 9223372036854775807)

#define UINT_FAST8_MAX ((uint_fast8_t) 255)
#define UINT_FAST16_MAX ((uint_fast16_t) 65535)
#define UINT_FAST32_MAX ((uint_fast32_t) 4294967295)
#define UINT_FAST64_MAX ((uint_fast64_t) 18446744073709551615)



/* 7.18.2.4 Limits of integer types capable of holding object pointers */

#define INTPTR_MIN ((intptr_t) -32768)
#define INTPTR_MAX ((intptr_t) 32767)
#define UINTPTR_MAX ((intptr_t) 65535)



/* 7.18.2.5 Limits of greatest-width integer types */

#define INTMAX_MIN ((intmax_t) -9223372036854775808)
#define INTMAX_MAX ((intmax_t) 9223372036854775807)
#define UINTMAX_MAX ((uintmax_t) 18446744073709551615)



/* 7.18.3 Limits of other integer types */

#define PTRDIFF_MIN ((int32_t) -65536)
#define PTRDIFF_MAX ((int32_t) 65535)

#ifdef __STDC_LIMIT_MACROS
#define SIG_ATOMIC_MIN INT32_MIN
#define SIG_ATOMIC_MAX INT32_MAX
#endif

#define SIZE_MAX 65535

#ifdef __STDC_CONSTANT_MACROS
#define WCHAR_MIN INT16_MIN
#define WCHAR_MAX INT16_MAX
#define WINT_MIN INT16_MIN
#define WINT_MAX INT16_MAX
#endif



/* 7.18.4.1 Macros for minimum-width integer constants */

#define INT8_C(x) ((int8_t) x)
#define INT16_C(x) ((int16_t) x)
#define INT32_C(x) ((int32_t) x)
#define INT64_C(x) ((int64_t) x)

#define UINT8_C(x) ((uint8_t) x)
#define UINT16_C(x) ((uint16_t) x)
#define UINT32_C(x) ((uint32_t) x)
#define UINT64_C(x) ((uint64_t) x)



/* 7.18.4.2 Macros for greatest-width integer constants */

#define INTMAX_C(x) ((intmax_t) x)
#define UINTMAX_C(x) ((uintmax_t) x)

#endif /* __STDINT_H */


版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/191472.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 控制台打印图形_前端控制台打印

    控制台打印图形_前端控制台打印问题描述一、在控制台输出以星号打印的三角形思路:在外部使用循环语句执行5次每次打印1行,每行的内容分别为空格和星号,每行空格缩进的数量为5减去所在行数,星号的数量是所在行数的2倍减1。在内部使用循环语句首先打印空格,然后打印星号”*”,对应的打印次数用循环次数控制,打印星号之后就可以换行。publicstaticvoidmain(String[]args){ //打印图形, intn=5;//表示要打印几行 for(inti=1;i<=n;i++){//i表示每行

    2022年10月20日
    3
  • 什么是跨域?什么情况下会发生跨域请求?

    什么是跨域?什么情况下会发生跨域请求?跨域,指的是浏览器不能执行其他网站的脚本。它是由浏览器的同源策略造成的,是浏览器施加的安全限制。同源策略:所谓同源是指:协议,域名,端口均相同。即便两个不同的域名指向同一个ip地址,也非同源。http://www.123.com/index.html调用http://www.123.com/server.php(非跨域)http://www.123.com/index.html调用http://www.456.com/server.php(主域名不同:123/456,跨域)http:/

    2022年5月29日
    60
  • Java 介绍

    1 Java 介绍 Java的历史 Java的历史非常有趣。 Java最初是为交互式电视而设计的,但是对于当时的数字有线电视行业来说,它是太先进的技术。 Java的历史始于绿色团队…

    2022年1月24日
    49
  • matlab绘图颜色RGB

    matlab绘图颜色RGB目录1.MATLAB中颜色数值2.常用颜色3.matlab代码本文转载于https://www.jianshu.com/p/46af0b95ead7?tdsourcetag=s_pctim_aiomsg1.MATLAB中颜色数值2.常用颜色3.matlab代码semilogy(SNRs,mse,’Color’,[0.63,0.13,0.94],’Lin…

    2022年5月31日
    60
  • leetcode-91解码方法(动态规划|记忆化搜索)[通俗易懂]

    leetcode-91解码方法(动态规划|记忆化搜索)[通俗易懂]一条包含字母 A-Z 的消息通过以下映射进行了 编码 :‘A’ -> 1‘B’ -> 2…‘Z’ -> 26要 解码 已编码的消息,所有数字必须基于上述映射的方法,反向映射回字母(可能有多种方法)。例如,“111” 可以将 “1” 中的每个 “1” 映射为 “A” ,从而得到 “AAA” ,或者可以将 “11” 和 “1”(分别为 “K” 和 “A” )映射为 “KA” 。注意,“06” 不能映射为 “F” ,因为 “6” 和 “06” 不同。给你一个只含数字的 非空 字符串

    2022年8月8日
    4
  • 软件公司有哪些[通俗易懂]

    软件公司有哪些[通俗易懂]1、ERP厂商sap、oracle、赛捷(sage)、用友、金蝶、鼎捷、神州数码、浪潮、新中大、东软、中软、宝信软件、博科、天元国信、微软、正航软件、管家婆、金算盘、管易、智邦国际、德米萨、通易、精效ERP、万里牛懒人ERP、来钱快速达、任我行、美萍、精算软件、艾特、快普、商友、东华软件、高格ERP、汉得信息、哲霖软件、九天软件、网店管家、吉客云、普源软件2、CRM厂商salesforce、南讯软件、爱客、八百客、纷享销客、百会、车商通SCRM、EC、富润、红圈、码客、前海圆舟、时趣SOCIAL、数云

    2022年10月10日
    3

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号