Tutorials Point


  Parrot Tutorial
  Parrot Examples
  Parrot Resources
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     About TP     Advertising  

Parrot Datatypes

previous next AddThis Social Bookmark Button


Advertisements

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 slightly 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.



previous next Printer Friendly

Advertisements


  

Advertisements