Int64: is the largest integer in Delphi, with a 64-bit signed integer

Source: Internet
Author: User
Tags error handling min

declaration: Type Int64 = -9223372036854775808..9223372036854775807;

Description: Int64 is a signed integer that is 64-bit stored. This size is already fixed and will not change in future Delphi versions. Functions like IntToStr also support the Int64 type (implemented by overloading).

When an integer constant exceeds the maximum value of an integer type, it is cast to the Int64 type.

Note: There are no unsigned 64-bit integers in Delphi.

The comp type is also a 64-bit signed integer that is now not recommended for use.

{Show Int64 storage range} var   min, Max:int64; begin   //Get type maximum and minimum   min: = Low (Int64);   Max: = High (Int64);   ShowMessage (' min Int64 value = ' +inttostr (min));   

Program Run Result:

Min Int64 value = 9223372036854775808

Max Int64 value = 9223372036854775807

-----------------------------------------------------------------------------------------------

Delphi 64 vs. 32-bit differences

Transferred from: Http://www.neugls.info/?p=91&lang=zh
Recently, Delphi launched a 64-bit preview version, I do as a faithful delphier, see this news, the first time to learn, and write this as a reference for the future.
The same point: In the Delphi 64-bit version, the unicodestring,ansistring,widestring in use with 32 no difference, only the index into 64 bits, such as: S[i] in the I became 64 bits.

singed Types

DELPHI/32

DELPHI/64

Shortint

1 bytes

SmallInt

2 bytes

Longint

4 bytes

Integer

4 bytes

Int64

8 bytes


unsinged Types

DELPHI/32

DELPHI/64

Byte

1 bytes

Word

2 bytes

Longword

4 bytes

Cardianl

4 bytes

UInt64

8 bytes

← symbol indicates the same size as Delphi/32
Different places: nativeint,nativeuint-64 bits
Point (all pointers)-bits
Dynamic arrays-64-bit Indexing
Floating point math–double
Point
String
Class instance
Class reference
Interface
Ansistring
Widestring
UnicodeString
Procedure pointer
Dynamic Array
Pansichar
Pwidechar
PChar
The above type is 4 bytes in 32 bits and 8 bytes under 64 bits.
Generally speaking:
The same Windows API, such as: Createwindowex,peekmessage,etc the same Delphi RTL:SYSUTILS,CLASSES,GENERICS.COLLECTIONS,ETC VCL is the same: forms,graphics,controls,menus,etc error handling is also the same: try...finally ....., try....exception ... Under 64 bits, these calling conventions will be seen as consistent: Register,passcal, Cdecl,stdcall
DELPHI/64 does not support Pascal with Basm (ASM), only the pure ASM procedure is supported.
The preceding four-pass register of the calling procedure or function also becomes: RCX, RDX, R8, R9 (or XMM0-XMM3)
A display cast is required when working with the message structure body, for example:
SendMessage (Hwnd,wm_settext,0,lparam (@MyCharArray));
Message.result:=lresult (self);

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.