SizeOf Function in Delphi

SizeOf Function in Delphi

Question:
I’m using Delphi 2.0 Client/Server. The Delphi Object Pascal user’s guide says that the Integer size is 2 bytes (signed 16-bit with Range -32768-32768). But when I do the SizeOf(Integer) in the Delphi Evaluate box, I get the value 4. Is the SizeOf Integer in Delphi 2 or 4 bytes?

Answer:
Hmmm…must have been a holdover from the Delphi 1 documentation. In Delphi 1, Integer types were pure 16-bit, or 2 byte types. In all Win32 versions of Delphi, Integer is a 32-bit or 4-byte type. If you still need to use a 16-bit integer in Delphi 2, just declare you variable as SmallInt.

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several