
src/pmc/scalar.pmc - Scalar Abstract Superclass

These are the vtable functions for the scalar base PMC class
void assign_pmc(PMC *value)Sets the PMC *value,
calling the appropriate set_* method according to the type of *value.

PMC *subtract(PMC *value,
PMC *dest)void add(PMC *value,
PMC *dest)void add_int(INTVAL value,
PMC *dest)void add_float(FLOATVAL value,
PMC *dest)Adds value to the number and returns the result in *dest.
If dest is NULL it's created.
void i_add(PMC *value)void i_add(INTVAL value)void i_add(FLOATVAL value)Adds value to SELF inplace.
PMC *subtract(PMC *value,
PMC *dest)PMC *subtract_int(INTVAL value,
PMC *dest)PMC *subtract_float(FLOATVAL value,
PMC *dest)Subtracts value from the number and returns the result in *dest.
If dest doesn't exist a new Float is created.
void i_subtract(PMC *value)void i_subtract_int(INTVAL value)void i_subtract_float(FLOATVAL value)Subtracts value from SELF inplace.
PMC *multiply(PMC *value,
PMC *dest)PMC *multiply_int(INTVAL value,
PMC *dest)PMC *multiply_float(FLOATVAL value,
PMC *dest)Multiplies the number by value and returns the result in *dest.
PMC *divide(PMC *value,
PMC *dest)PMC *divide_int(INTVAL value,
PMC *dest)PMC *divide_float(FLOATVAL value,
PMC *dest)Divides the number by value and returns the result in *dest.
void i_divide(PMC *value)void i_divide_int(INTVAL value)void i_divide_float(FLOATVAL value)Divides SELF by value inplace.
PMC *floor_divide(PMC *value,
PMC *dest)PMC *floor_divide_int(INTVAL value,
PMC *dest)PMC *floor_divide_float(FLOATVAL value,
PMC *dest)Divides the number by value and returns the result in *dest.
void i_floor_divide(PMC *value)void i_floor_divide_int(INTVAL value)void i_floor_divide_float(FLOATVAL value)Divides SELF by value inplace.
PMC *modulus(PMC *value,
PMC *dest)PMC *modulus(INTVAL value,
PMC *dest)PMC *modulus(FLOATVAL value,
PMC *dest)Calculates the value of corrected mod value and returns the result in dest.
See also ops/math.ops.
void i_modulus(PMC *value)void i_modulus(INTVAL value)void i_modulus(FLOATVAL value)Calculates modulus inplace
PMC *neg(PMC *dest)void i_neg()Set dest to the negated value of SELF.
PMC *concatenate(PMC *value,
PMC *dest)PMC *concatenate_str(STRING *value,
PMC *dest)Returns in *dest the result of concatenating the scalar and *value.
void concatenate(PMC *value)void concatenate_str(STRING *value)Concatenate the string value in place.
PMC *repeat(PMC *value,
PMC *dest)PMC *repeat_int(INTVAL value,
PMC *dest)Returns in *dest the result of repeating the scalar value times.
void i_repeat(PMC *value)void i_repeat_int(INTVAL value)Repeat the string SELF in place value times.
INTVAL cmp_num(PMC *value)Returns the result of comparing the floating-point values of the scalar and *value.
INTVAL cmp_string(PMC *value)Returns the result of comparing the string values of the scalar and *value.
INTVAL is_equal(PMC *value)Returns whether the PMC is equal to *value.
INTVAL is_equal_num(PMC *value)Returns whether the PMC is numerically equal to *value.
INTVAL is_equal_string(PMC *value)Returns whether the PMC has string equality with *value.
INTVAL defined()Always returns true.
STRING *substr(INTVAL offset,
INTVAL length)Returns the substring of length length of the scalar starting at offset.