官术网_书友最值得收藏!

Using simple built-in data types

Perl 6 comes with a number of various built-in types that cover the common range of things, such as Booleans, integers, and strings, but also offers unusual data types. We will cover them in this section. To demonstrate the built-in types, we will print them to the console using the say function, as we did in the ‘Hello, World!’ example.

The hierarchy is built using two types of items: roles and classes. Roles are drawn in ovals, while classes are rectangle boxes. Roles are similar to interfaces in some programming languages. In this chapter, we won't focus on the details of what is a role or a class. You can learn that in detail in Chapter 8, Object-Oriented Programming. For now, we will assume that you have some basic understanding of object-oriented programming and will be able to understand the hierarchy of the data types.

In the following sections of this chapter, we will go through the main data types that you may use in your practice.

主站蜘蛛池模板: 科技| 潢川县| 丹凤县| 吉安县| 秦皇岛市| 扶沟县| 明溪县| 东光县| 遂宁市| 讷河市| 澎湖县| 那坡县| 开原市| 皋兰县| 汤阴县| 武穴市| 墨玉县| 泰州市| 镇雄县| 荔浦县| 丽江市| 井研县| 昌吉市| 迁西县| 娄烦县| 甘谷县| 乌海市| 札达县| 赫章县| 社旗县| 买车| 习水县| 辽源市| 杂多县| 淳安县| 惠来县| 伽师县| 子洲县| 竹山县| 黄陵县| 泾源县|