Ruby Integer Data Type

Source: Internet
Author: User
Ruby has two types of data: integer and string. Ruby is fully oo. Programming LanguageDifferent from C ++, its integers and strings are also class types. There are two types of integer. When the integer value ranges from-2 ^ 30 to 2 ^ 30-1 (or-2 ^ 62 to 2 ^ 62-1, related to the machine code length, the fixnum class type is used. If it is not in the preceding range, the bignum class type is used. The bignum class type can represent the maximum value that can be expressed in the remaining memory space, it is composed of a series of short integers. Frequently Used members include: ID, (an uncertain number) class, (Class Name) times, (repeated times) upto (m), (until m value) downto (m), (until the m value) Step (M, S) (to S for the order until m ). When a piece of data is relatively long, you can use "_" to connect to the data, such as 8_1 equal to 81? \ C-X is used to obtain the value after X & 0x9f? \ M-X is used to obtain the value after X | 0x80? X indicates the ASCII code value of X.
Related Article

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.