integer,longint的区别?

来源:百度知道 编辑:UC知道 时间:2024/05/22 17:01:28

Integer 变量存储为 16位(2 个字节)的数值形式,其范围为 -32,768 到 32,767 之间
Long int 变量存储为 32 位(4 个字节)有符号的数值形式,其范围从 -2,147,483,648 到 2,147,483,647

integer表示有符号32位整数,而longint表示有符号64位整数,interger表示的数的范围为(-2147483648到2147483647),而longint表示的数的范围为(-9223372036854775808到9223372036854775807),他们表示的数的范围不一样,但都可以表示负数和整数,longint包含int表示的数