"Unity Basics ④" data type, memory size, data range, and integer type

Source: Internet
Author: User

This article is for embarrassing blog personal original articles, reproduced please indicate the source! Http://blog.csdn.net/yunpro "


" Data type "

The size of each data opening memory is determined by the maximum value of the data type.

C # source is stored on disk, data type is stored in memory

1, numeric value (shaping: int, long; non-shaping: float, double)

2, non-numeric (char, String)


" range of data "

BOOL Boolean True or false True/false


SByte eight-bit signed integer -128~127

BYTE eight-bit unsigned integer 0~255

Short 16-bit unsigned integer 0~65535


int 32-bit signed integer -214783648~214783647

Unit 32-bit unsigned integer 0~4294967295


Long 64-bit signed integer -9223372036854775808~9223372036854775807

ULONG 64 is an unsigned integer 0~18446744073709551615


Char 16-bit character type all Unicode encoded characters


Float 32 single-precision floating -point type approx. seven valid decimal digits

Double 64-bit dual-precision floating-point type approximately 15~16 a valid decimal number

Decimal 128-bit high-precision decimal number type approximately 28~29 valid decimal digits


" integer value "

Types with int, uint, long, ulong

+//This is an int type

32L//This is a long type

Add u or u in the back to represent unsigned integers

128U//This is a UINT type

128UL//This is a ulong type



I am keen on the game program production, welcome and I have to discuss with a variety of exchanges!

e-mail: [Email protected]

"Unity Basics ④" data type, memory size, data range, and integer type

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.