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

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.

主站蜘蛛池模板: 图木舒克市| 昌黎县| 谢通门县| 江阴市| 屏南县| 吉林市| 买车| 吐鲁番市| 正镶白旗| 手游| 和静县| 靖西县| 稷山县| 孝义市| 德格县| 梅州市| 融水| 万州区| 南陵县| 陆良县| 普陀区| 景泰县| 中江县| 武川县| 龙海市| 三台县| 广南县| 民丰县| 岢岚县| 平泉县| 邹平县| 汉阴县| 阿克陶县| 本溪市| 舟山市| 长汀县| 通化市| 郯城县| 鹤峰县| 张家界市| 娄底市|