- Perl 6 Deep Dive
- Andrew Shitov
- 51字
- 2021-07-03 00:05:51
Getting the numerator and denominator
To get the two parts of a Rat value, use the numerator and denominator methods. Let's take a look at how they work on the example of the value from the previous section:
my $x = 10/3;
say $x.numerator; # 10
say $x.denominator; # 3
推薦閱讀
- C++程序設計教程
- Learn TypeScript 3 by Building Web Applications
- Unreal Engine Physics Essentials
- Mastering Adobe Captivate 2017(Fourth Edition)
- PHP基礎案例教程
- Java從入門到精通(第4版)
- 網頁設計與制作教程(HTML+CSS+JavaScript)(第2版)
- Mastering JBoss Enterprise Application Platform 7
- 可解釋機器學習:模型、方法與實踐
- RISC-V體系結構編程與實踐(第2版)
- Salesforce Reporting and Dashboards
- Visual C++開發入行真功夫
- Learning PHP 7
- Building Microservices with .NET Core
- Java零基礎實戰