各语言的数据类型名称对比
| 储存大小(各机器不同,参考值) | 精度 | C | C++ | C# | F# | VB.NET | java | javascirpt | Python | go | Lua | rust | |
整数类型 | 整形 | 2 或 4 字节 | | int(unsigned int) | | int(uint); Int32(UInt32); | | | | | | | | |
短整型 | 2 字节 | | short(unsigned short) | | short(ushort); Int16(UInt16); | | | | | | | | | |
长整型 | 4 字节 | | long(unsigned long) | | long(ulong); Int64(UInt64); | | | | | | | | | |
浮点类型 | 单精度 | 4字节 | 6 位小数 | float | | float(Float);Single; | | | float | | | | | |
双精度 | 8字节 | 15 位小数 | double | | double(Double); | | | double | | | | number | | |
长双精度 | 16字节 | 19 位小数 | long double | | | | | | | | | | | |
布尔型 | 布尔型 | false和true | | | | bool | | | | | | | boolean | |
字符型 | 字符型 | | | char(unsigned char 0-255); signed char) | | byte(Byte) 0-255; sbyte; | | | byte:-128~127 | | | | string | |
字符串型 | | | | | | string(String); | | | | | | |
|
|
指针型 | | | | | | IntPtr;int*; char*;string* | | | | | | |
|
|
弱类型 | | | | | | var | | | var | | | |
|
|
无效值 | | | | | | | | | | | | | nil |
|
作者:꧁执笔小白꧂