NAME
src/pmc/undef.pmc - Undef PMC
DESCRIPTION
This is Parrot's generic undef type. This PMC has no defined value. It returns a numeric value of 0, a boolean of false, and an empty string. When assigned a number, integer, or string it morphs to a Number, Integer, or String PMC respectively, and when assigned a generic PMC it morphs into a PMC of the passed-in type and does a same-type assignment from there.
Methods
void set_pmc(PMC *other)
Sets the current PMC to void assign_pmc(PMC *other)
Assigns the PMC to the value of INTVAL get_integer()
Returns 0.
INTVAL defined()
Returns 0.
void set_integer_native(INTVAL value)
Morphs the current PMC to an FLOATVAL get_number()
Returns 0.0.
void set_number_native(FLOATVAL value)
Morphs the current PMC to a STRING *get_string()
Returns an empty string.
void set_string_native(STRING *value)
Morphs the current PMC to a INTVAL get_bool()
Returns 0.
void share()
Unknown.
(TODO)
PMC *clone()
Clones the current Undef PMC.
INTVAL is_equal(PMC *value)
Returns 1 if the
*other
by first changing the current PMC to the appropriate type.
*other
by first changing the PMC to the appropriate type.
Integer
and sets the value from value
.
Float
and sets the value from value
.
String
and sets the value from value
.
*value
is an Undef PMC,
0 otherwise.