Delphi Embedded Assembly [21]-other integer types of Delphi

Source: Internet
Author: User
Besides byte, word, Cardinal, and integer, the integer types of Delphi include:
Longint, longword, shortint, smallint, int64
Among them, longint is equivalent to integer; longword is equivalent to Cardinal. There are three types as follows:
Optional int, smallint, int64

// The occurrence Int Is A 1-byte (8-bit) signed integer var I: Occurrence int; begin // The maximum value is: 011111112 ASM mov I, 01111111b end; showmessage (inttostr (I); {127} // the minimum value is: 100000002 ASM mov I, 0000000b end; showmessage (inttostr (I); {-128} end;

 // Smallint is a two-byte (16-bit) signed integer var I: smallint; begin // its maximum value is: 01111111 111111112 ASM mov I, 0111111111111111b end; showmessage (inttostr (I); {32767} // the minimum value is: 10000000 000000002 ASM mov I, too many else 000b end; showmessage (inttostr (I); {-32768} end;

 // Int64 is 8 bytes (64-bit). I cannot test it for the moment.


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: 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.