| parrotcode: Integer PMC class | |
| Contents | PMCs | 

classes/integer.pmc - Integer PMC class

Integer provides an integer for languages that want a value-restricted integer type without going to an I register.

void init()0.PMC *instantiate()void share()FLOATVAL get_number()BIGNUM *get_bignum()NULL.STRING *get_string()void morph(INTVAL type)void set_pmc(PMC *value)*value,
calling the appropriate set_* method according to the type of *value.void set_integer_same(PMC *value)void set_integer_native(INTVAL value)Integer *value.void set_number(PMC *value)Float and sets the value from *value.void set_number_native(FLOATVAL value)Float and sets the value from value.void set_bignum(PMC *value)void set_bool(INTVAL value)void set_bignum_native(BIGNUM *value)void set_string (PMC *value)void set_string_native(STRING *value)*value.void add_int(INTVAL value, PMC *dest)void add(PMC *value, PMC *dest)value to the integer and returns the result in *dest.void subtract(PMC *value, PMC *dest)*value from the integer and returns the result in *dest.void subtract_int(INTVAL value, PMC *dest)value from the integer and returns the result in *dest.void multiply(PMC *value, PMC *dest)*value and returns the result in *dest.void multiply_int(INTVAL value, PMC *dest)value and returns the result in *dest.void divide(PMC *value, PMC *dest)void floor_divide(PMC *value, PMC *dest)*value and returns the result in *dest.void divide_int(INTVAL value, PMC *dest)value and returns the result in *dest.void floor_divide_int(INTVAL value, PMC *dest)value and returns the result in *dest.void cmodulus(PMC *value, PMC *dest)mod *value and returns the result in *dest.void cmodulus_int(INTVAL value, PMC *dest) mod value and returns the result in *dest.void modulus(PMC *value, PMC *dest)mod *value and returns the result in *dest.void modulus_int(INTVAL value, PMC *dest)mod value and returns the result in *dest.void neg(PMC *dest)dest to the negated value of SELF.void bitwise_or(PMC *value, PMC *dest)OR of the integer and *value and returns the result in *dest.void bitwise_or_int(INTVAL value, PMC *dest)OR of the integer and value and returns the result in *dest.void bitwise_and(PMC *value, PMC *dest)AND of the integer and *value and returns the result in *dest.void bitwise_and_int(INTVAL value, PMC *dest)AN of the integer and *value and returns the result in *dest.void bitwise_xor(PMC *value, PMC *dest)XOR of the integer and *value and returns the result in *dest.void bitwise_xor_int(INTVAL value, PMC *dest)XOR of the integer and value and returns the result in *dest.void bitwise_not(PMC *dest)NOT of the integer and returns the result in *dest.void bitwise_shr(PMC *value, PMC *dest)<<>>>>) of the integer by *value and returns the result in *dest.void bitwise_shr_int(INTVAL value, PMC *dest)<<>>>>) of the integer by value and returns the result in *dest.void bitwise_shl(PMC *value, PMC *dest)<<<<>>) of the integer by *value and returns the result in *dest.void bitwise_shl_int(INTVAL value, PMC *dest)<<<<>>) of the integer by value and returns the result in *dest.INTVAL is_equal (PMC *value)== operation.INTVAL cmp(PMC *value)*value.INTVAL cmp_num(PMC *value)*value.void logical_not(PMC *value)*value.void increment()void decrement()void absolute()dest to the absolute value of SELF.void freeze(visit_info *info)void thaw(visit_info *info)
|  |   |