Delphi Study Notes (1)

Source: Internet
Author: User
I tried to learn Delphi in college, but I was born with a head-and-tail character. Now, I hope I can make some achievements in my work.
Delphi programming uses the Object Pascal language. All the tutorials I have read are simple and easy to understand, but I seem confused. After all, it is now the world of C series.

Object Pascal has multiple predefined data types. You can describe any of these types of variables:
Integer: the integer value ranges from-32768 to 32767, which occupies 2 bytes of memory. The integer value ranges from-128 to 127, which occupies 1 byte memory. The longint value ranges from-2147443648 to 2147483647, which occupies 4 bytes of memory; byte ranges from 0 to 255, accounting for 1 byte; Word ranges from 0 to 65535, accounting for 2 bytes of memory. They are all numbers without decimal digits.
Real Type: single can contain 7 to 8 Valid decimal places, occupying 4 bytes of memory; double class can include 15 to 16 valid decimal places, occupying 8 bytes of memory; the extended type contains 19 to 20 valid decimal places, which occupies 10 bytes of memory. The comp can contain 19 to 20 valid decimal places, occupying 8 bytes of memory. The preceding real number type can be used only when option [n +] 8087/80287 is enabled. Real can contain 11 to 12 decimal digits, occupying 6 bytes of memory. It is used only when it is compatible with Borland Pascal. Otherwise, double or extended should be used.
Boolean: Boolean, which contains only true or false values and occupies 1 byte of memory.
Character Type: Char, an ASCII character; string type: A string can contain up to 255 ASCII characters.
Pointer: pointer, which can point to any specific type.
String: pchar, a pointer to a string ending with zero.
In addition to predefined types, Delphi also has custom types.

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.