docs/pdds/pdd04_datatypes.pod - Parrot's internal data types
This PDD describes Parrot's internal data types.
{{ NOTE: this is a good overview, but we need more complete specifications of the behavior of the datatypes. }}
This PDD details the basic datatypes that the Parrot core knows how to deal with. Three of these (the integer, floating point and string datatypes) have no additional semantics. The fourth datatype, the Parrot Magic Cookie (PMC) acts as the basis for all high level languages running on top of Parrot; only the most basic aspects are described here.
Note that PMC and string internals are volatile and may be changed in the future (although this will become increasingly unlikely as we near v1.0). Access from external code to the internals of particular datatypes should be via the extension mechanism (see docs/pdds/pdd11_extending.pod, which has more explicit guarantees of stability.
Integer data types are generically referred to as INTs. These are whatever size native integer was chosen at Parrot configuration time. The C-level typedefs INTVAL and UINTVAL get you a platform-native signed and unsigned integer respectively.
INT
INTVAL
UINTVAL
Floating point data types are generically referred to as NUMs. These are whatever size float was chosen when parrot was configured. The C level typedef FLOATVAL will get you one of these.
NUM
FLOATVAL
None.
The perl modules Math::BigInt and Math::BigFloat. Alex Gough's suggestions for bigint/bignum implementation, outlined in docs/pdds/pdd14_bignum.pod. The Unicode standard at http://www.unicode.org.
Type refers to a basic Parrot data type. There are four such: integers, floating point numbers (often just numbers), strings and Parrot Magic Cookies (PMCs).
1.4
Maintainer: Dan Sugalski <dan@sidhe.org> Class: Internals PDD Number: 4 Version: 1.5 Status: Developing Last Modified: 11 June 2005 PDD Format: 1 Language: English
Removed BigInt and BigNum from the definition of I* and N* registers -- according to Leo they are now always PMCs, never register types of their own.
Document basic PMC internals. Make clear the fact that the bigint/bignum description is still provisional. Other minor fixups to make the documentation match reality.
Fixed some silly typos and dropped phrases.
Took all the underscores out of the field names.
The string header format has changed some to allow for type tagging. The flags information for strings has changed as well.
INT and NUM are now concepts rather than data structures, as making them data structures was a Bad Idea.
None. First version
To install Parrot::Op, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parrot::Op
CPAN shell
perl -MCPAN -e shell install Parrot::Op
For more information on module installation, please visit the detailed CPAN module installation guide.