parrotcode: Generic undefined value | |
Contents | PMCs |
src/pmc/undef.pmc - Generic undefined value
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.
void set_pmc(PMC *other)
*other
by first changing the current PMC to the appropriate type.void assign_pmc(PMC *other)
*other
by first changing the PMC to the appropriate type.INTVAL get_integer()
INTVAL defined()
void set_integer_native(INTVAL value)
Integer
and sets the value from value
.FLOATVAL get_number()
void set_number_native(FLOATVAL value)
Float
and sets the value from value
.STRING *get_string()
void set_string_native(STRING *value)
String
and sets the value from value
.INTVAL get_bool()
void share()
PMC *share_ro()
PMC *clone()
INTVAL is_equal(PMC *value)
*value
is an Undef PMC,
0 otherwise.
|