- Parrot - Branches
- Parrot - Operations
- Parrot - Registers
- Parrot - Datatypes
- Parrot - Garbage Collection
- Parrot - Instructions
- Parrot - Installation
- Parrot - Overview
- Parrot - Home
Parrot Examples
Parrot Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Parrot - Datatypes
The Parrot CPU has four basic data types:
IV
An integer type; guaranteed to be wide enough to hold a pointer.
NV
An architecture-independent floating-point type.
STRING
An abstracted, encoding-independent string type.
PMC
A scalar.
The first three types are pretty much self-explanatory; the final type - Parrot Magic Cookies, are spghtly more difficult to understand.
What are PMCs?
PMC stands for Parrot Magic Cookie. PMCs represent any complex data structure or type, including aggregate data types (arrays, hash tables, etc.). A PMC can implement its own behavior for arithmetic, logical and string operations performed on it, allowing for language-specific behavior to be introduced. PMCs can be built in to the Parrot executable or dynamically loaded when they are needed.
Advertisements