Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > cd14cddf3b3ceaf1193157472227757a > files > 331

parrot-doc-1.6.0-1mdv2010.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Parrot  - Scalar Abstract Superclass</title>
        <link rel="stylesheet" type="text/css"
            href="../../../resources/parrot.css"
            media="all">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    </head>
    <body>
        <div id="wrapper">
            <div id="header">

                <a href="http://www.parrot.org">
                <img border=0 src="../../../resources/parrot_logo.png" id="logo" alt="parrot">
                </a>
            </div> <!-- "header" -->
            <div id="divider"></div>
            <div id="mainbody">
                <div id="breadcrumb">
                    <a href="../../../html/index.html">Home</a> &raquo; <a href="../../../html/pmc.html">PMCs</a> &raquo; Scalar Abstract Superclass
                </div>

<h1><a name="NAME"
>NAME</a></h1>

<p>src/pmc/scalar.pmc &#45; Scalar Abstract Superclass</p>

<h1><a name="DESCRIPTION"
>DESCRIPTION</a></h1>

<p>These are the vtable functions for the scalar base PMC class</p>

<h2><a name="Methods"
>Methods</a></h2>

<dl>
<dt><a name="void_assign_pmc(PMC_*value)"
><b><code>void assign_pmc(PMC *value)</b></code></a></dt>
Sets the PMC <code>*value</code>,
calling the appropriate <code>set_*</code> method according to the type of <code>*value</code>.</dl>

<h1><a name="Mathematical_Methods"
>Mathematical Methods</a></h1>

<dl>
<dt><a name="PMC_*subtract(PMC_*value,_PMC_*dest)"
><b><code>PMC *subtract(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="void_add(PMC_*value,_PMC_*dest)"
><b><code>void add(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="void_add_int(INTVAL_value,_PMC_*dest)"
><b><code>void add_int(INTVAL value, PMC *dest)</b></code></a></dt>

<dt><a name="void_add_float(FLOATVAL_value,_PMC_*dest)"
><b><code>void add_float(FLOATVAL value, PMC *dest)</b></code></a></dt>
Adds <code>value</code> to the number and returns the result in <code>*dest</code>.
If <code>dest</code> is NULL it&#39;s created.
<dt><a name="void_i_add(PMC_*value)"
><b><code>void i_add(PMC *value)</b></code></a></dt>

<dt><a name="void_i_add(INTVAL_value)"
><b><code>void i_add(INTVAL value)</b></code></a></dt>

<dt><a name="void_i_add(FLOATVAL_value)"
><b><code>void i_add(FLOATVAL value)</b></code></a></dt>
Adds <code>value</code> to <code>SELF</code> inplace.
<dt><a name="PMC_*subtract(PMC_*value,_PMC_*dest)"
><b><code>PMC *subtract(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*subtract_int(INTVAL_value,_PMC_*dest)"
><b><code>PMC *subtract_int(INTVAL value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*subtract_float(FLOATVAL_value,_PMC_*dest)"
><b><code>PMC *subtract_float(FLOATVAL value, PMC *dest)</b></code></a></dt>
Subtracts <code>value</code> from the number and returns the result in <code>*dest</code>.
If <code>dest</code> doesn&#39;t exist a new <code>Float</code> is created.
<dt><a name="void_i_subtract(PMC_*value)"
><b><code>void i_subtract(PMC *value)</b></code></a></dt>

<dt><a name="void_i_subtract_int(INTVAL_value)"
><b><code>void i_subtract_int(INTVAL value)</b></code></a></dt>

<dt><a name="void_i_subtract_float(FLOATVAL_value)"
><b><code>void i_subtract_float(FLOATVAL value)</b></code></a></dt>
Subtracts <code>value</code> from <code>SELF</code> inplace.
<dt><a name="PMC_*multiply(PMC_*value,_PMC_*dest)"
><b><code>PMC *multiply(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*multiply_int(INTVAL_value,_PMC_*dest)"
><b><code>PMC *multiply_int(INTVAL value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*multiply_float(FLOATVAL_value,_PMC_*dest)"
><b><code>PMC *multiply_float(FLOATVAL value, PMC *dest)</b></code></a></dt>
Multiplies the number by <code>value</code> and returns the result in <code>*dest</code>.
<dt><a name="PMC_*divide(PMC_*value,_PMC_*dest)"
><b><code>PMC *divide(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*divide_int(INTVAL_value,_PMC_*dest)"
><b><code>PMC *divide_int(INTVAL value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*divide_float(FLOATVAL_value,_PMC_*dest)"
><b><code>PMC *divide_float(FLOATVAL value, PMC *dest)</b></code></a></dt>
Divides the number by <code>value</code> and returns the result in <code>*dest</code>.
<dt><a name="void_i_divide(PMC_*value)"
><b><code>void i_divide(PMC *value)</b></code></a></dt>

<dt><a name="void_i_divide_int(INTVAL_value)"
><b><code>void i_divide_int(INTVAL value)</b></code></a></dt>

<dt><a name="void_i_divide_float(FLOATVAL_value)"
><b><code>void i_divide_float(FLOATVAL value)</b></code></a></dt>
Divides <code>SELF</code> by <code>value</code> inplace.
<dt><a name="PMC_*floor_divide(PMC_*value,_PMC_*dest)"
><b><code>PMC *floor_divide(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*floor_divide_int(INTVAL_value,_PMC_*dest)"
><b><code>PMC *floor_divide_int(INTVAL value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*floor_divide_float(FLOATVAL_value,_PMC_*dest)"
><b><code>PMC *floor_divide_float(FLOATVAL value, PMC *dest)</b></code></a></dt>
Divides the number by <code>value</code> and returns the result in <code>*dest</code>.
<dt><a name="void_i_floor_divide(PMC_*value)"
><b><code>void i_floor_divide(PMC *value)</b></code></a></dt>

<dt><a name="void_i_floor_divide_int(INTVAL_value)"
><b><code>void i_floor_divide_int(INTVAL value)</b></code></a></dt>

<dt><a name="void_i_floor_divide_float(FLOATVAL_value)"
><b><code>void i_floor_divide_float(FLOATVAL value)</b></code></a></dt>
Divides <code>SELF</code> by <code>value</code> inplace.
<dt><a name="PMC_*modulus(PMC_*value,_PMC_*dest)"
><b><code>PMC *modulus(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*modulus(INTVAL_value,_PMC_*dest)"
><b><code>PMC *modulus(INTVAL value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*modulus(FLOATVAL_value,_PMC_*dest)"
><b><code>PMC *modulus(FLOATVAL value, PMC *dest)</b></code></a></dt>
Calculates the value of corrected <code>mod</code> <code>value</code> and returns the result in <code>dest</code>.
See also ops/math.ops.
<dt><a name="void_i_modulus(PMC_*value)"
><b><code>void i_modulus(PMC *value)</b></code></a></dt>

<dt><a name="void_i_modulus(INTVAL_value)"
><b><code>void i_modulus(INTVAL value)</b></code></a></dt>

<dt><a name="void_i_modulus(FLOATVAL_value)"
><b><code>void i_modulus(FLOATVAL value)</b></code></a></dt>
Calculates modulus inplace
<dt><a name="PMC_*pow(PMC_*value,_PMC_*dest)"
><b><code>PMC *pow(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*pow_int(INTVAL_value,_PMC_*dest)"
><b><code>PMC *pow_int(INTVAL value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*pow_float(FLOATVAL_value,_PMC_*dest)"
><b><code>PMC *pow_float(FLOATVAL value, PMC *dest)</b></code></a></dt>
Calculates <code>SELF pow value</code> and returns the result in <code>dest</code>.
See also ops/math.ops.
<dt><a name="void_i_pow(PMC_*value)"
><b><code>void i_pow(PMC *value)</b></code></a></dt>

<dt><a name="void_i_pow_int(INTVAL_value)"
><b><code>void i_pow_int(INTVAL value)</b></code></a></dt>

<dt><a name="void_i_pow_float(FLOATVAL_value)"
><b><code>void i_pow_float(FLOATVAL value)</b></code></a></dt>
Calculates pow inplace
<dt><a name="PMC_*neg(PMC_*dest)"
><b><code>PMC *neg(PMC *dest)</b></code></a></dt>

<dt><a name="void_i_neg()"
><b><code>void i_neg()</b></code></a></dt>
Set <code>dest</code> to the negated value of <code>SELF</code>.</dl>

<h2><a name="Bitwise_Methods"
>Bitwise Methods</a></h2>

<dl>
<dt><a name="PMC_*bitwise_or(PMC_*value,_PMC_*dest)"
><b><code>PMC *bitwise_or(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*bitwise_or_int(INTVAL_value,_PMC_*dest)"
><b><code>PMC *bitwise_or_int(INTVAL value, PMC *dest)</b></code></a></dt>
Returns in <code>*dest</code> the bitwise <code>OR</code> of the scalar and <code>value</code>.
<dt><a name="void_i_bitwise_or(PMC_*value)"
><b><code>void i_bitwise_or(PMC *value)</b></code></a></dt>

<dt><a name="void_i_bitwise_or_int(INTVAL_value)"
><b><code>void i_bitwise_or_int(INTVAL value)</b></code></a></dt>
Inplace bitwise or.
<dt><a name="PMC_*bitwise_and(PMC_*value,_PMC_*dest)"
><b><code>PMC *bitwise_and(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*bitwise_and_int(INTVAL_value,_PMC_*dest)"
><b><code>PMC *bitwise_and_int(INTVAL value, PMC *dest)</b></code></a></dt>
Returns in <code>*dest</code> the bitwise <code>AND</code> of the scalar and <code>value</code>.
<dt><a name="void_i_bitwise_and(PMC_*value)"
><b><code>void i_bitwise_and(PMC *value)</b></code></a></dt>

<dt><a name="void_i_bitwise_and_int(INTVAL_value)"
><b><code>void i_bitwise_and_int(INTVAL value)</b></code></a></dt>
Inplace bitwise and.
<dt><a name="void_bitwise_xor(PMC_*value,_PMC_*dest)"
><b><code>void bitwise_xor(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="void_bitwise_xor_int(INTVAL_value,_PMC_*dest)"
><b><code>void bitwise_xor_int(INTVAL value, PMC *dest)</b></code></a></dt>
Returns in <code>*dest</code> the bitwise <code>XOR</code> of the scalar and <code>*value</code>.
<dt><a name="void_i_bitwise_xor(PMC_*value)"
><b><code>void i_bitwise_xor(PMC *value)</b></code></a></dt>

<dt><a name="void_i_bitwise_xor_int(INTVAL_value)"
><b><code>void i_bitwise_xor_int(INTVAL value)</b></code></a></dt>
Inplace bitwise and.
<dt><a name="PMC_*bitwise_not(PMC_*dest)"
><b><code>PMC *bitwise_not(PMC *dest)</b></code></a></dt>

<dt><a name="void_i_bitwise_not()"
><b><code>void i_bitwise_not()</b></code></a></dt>
Returns in <code>*dest</code> the bitwise negation of the scalar and <code>value</code>.
<dt><a name="PMC_*bitwise_shr(PMC_*value,_PMC_*dest)"
><b><code>PMC *bitwise_shr(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*bitwise_shr_int(INTVAL_value,_PMC_*dest)"
><b><code>PMC *bitwise_shr_int(INTVAL value, PMC *dest)</b></code></a></dt>
Returns in <code>*dest</code> the arithmetic shift right of the scalar by <code>value</code>.
A negative <code>value</code> shifts left.
The destination may become a <code>BigInt</code> as a result (but only if the shift amount is less than zero).
<dt><a name="void_i_bitwise_shr(PMC_*value)"
><b><code>void i_bitwise_shr(PMC *value)</b></code></a></dt>

<dt><a name="void_i_bitwise_shr_int(INTVAL_value)"
><b><code>void i_bitwise_shr_int(INTVAL value)</b></code></a></dt>
Inplace shift right.
A negative <code>value</code> shifts left.
SELF may become a <code>BigInt</code> as a result (but only if the shift amount is less than zero).
<dt><a name="PMC_*bitwise_lsr(PMC_*value,_PMC_*dest)"
><b><code>PMC *bitwise_lsr(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*bitwise_lsr_int(INTVAL_value,_PMC_*dest)"
><b><code>PMC *bitwise_lsr_int(INTVAL value, PMC *dest)</b></code></a></dt>
Returns in <code>*dest</code> the logical shift right of the scalar by <code>*value</code>.
<dt><a name="void_i_bitwise_lsr(PMC_*value)"
><b><code>void i_bitwise_lsr(PMC *value)</b></code></a></dt>

<dt><a name="void_i_bitwise_lsr_int(INTVAL_value)"
><b><code>void i_bitwise_lsr_int(INTVAL value)</b></code></a></dt>
Inplace shift right.
<dt><a name="PMC_*bitwise_shl(PMC_*value,_PMC_*dest)"
><b><code>PMC *bitwise_shl(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*bitwise_shl_int(INTVAL_value,_PMC_*dest)"
><b><code>PMC *bitwise_shl_int(INTVAL value, PMC *dest)</b></code></a></dt>
Returns in <code>*dest</code> the shift left of the scalar by <code>*value</code>.
A negative <code>value</code> shifts right.
The destination may become a <code>BigInt</code> as a result.
<dt><a name="void_i_bitwise_shl(PMC_*value)"
><b><code>void i_bitwise_shl(PMC *value)</b></code></a></dt>

<dt><a name="void_i_bitwise_shl_int(INTVAL_value)"
><b><code>void i_bitwise_shl_int(INTVAL value)</b></code></a></dt>
Inplace shift left.
A negative <code>value</code> shifts right.
SELF may become a <code>BigInt</code> as a result.</dl>

<h2><a name="String_Methods"
>String Methods</a></h2>

<dl>
<dt><a name="PMC_*concatenate(PMC_*value,_PMC_*dest)"
><b><code>PMC *concatenate(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*concatenate_str(STRING_*value,_PMC_*dest)"
><b><code>PMC *concatenate_str(STRING *value, PMC *dest)</b></code></a></dt>
Returns in <code>*dest</code> the result of concatenating the scalar and <code>*value</code>.
<dt><a name="void_concatenate(PMC_*value)"
><b><code>void concatenate(PMC *value)</b></code></a></dt>

<dt><a name="void_concatenate_str(STRING_*value)"
><b><code>void concatenate_str(STRING *value)</b></code></a></dt>
Concatenate the string <code>value</code> in place.
<dt><a name="PMC_*repeat(PMC_*value,_PMC_*dest)"
><b><code>PMC *repeat(PMC *value, PMC *dest)</b></code></a></dt>

<dt><a name="PMC_*repeat_int(INTVAL_value,_PMC_*dest)"
><b><code>PMC *repeat_int(INTVAL value, PMC *dest)</b></code></a></dt>
Returns in <code>*dest</code> the result of repeating the scalar <code>value</code> times.
<dt><a name="void_i_repeat(PMC_*value)"
><b><code>void i_repeat(PMC *value)</b></code></a></dt>

<dt><a name="void_i_repeat_int(INTVAL_value)"
><b><code>void i_repeat_int(INTVAL value)</b></code></a></dt>
Repeat the string <code>SELF</code> in place <code>value</code> times.</dl>

<h2><a name="Compare_Methods"
>Compare Methods</a></h2>

<dl>
<dt><a name="INTVAL_cmp_num(PMC_*value)"
><b><code>INTVAL cmp_num(PMC *value)</b></code></a></dt>
Returns the result of comparing the floating&#45;point values of the scalar and <code>*value</code>.
<dt><a name="INTVAL_cmp_string(PMC_*value)"
><b><code>INTVAL cmp_string(PMC *value)</b></code></a></dt>
Returns the result of comparing the string values of the scalar and <code>*value</code>.
<dt><a name="INTVAL_is_equal(PMC_*value)"
><b><code>INTVAL is_equal(PMC *value)</b></code></a></dt>
Returns whether the PMC is equal to <code>*value</code>.
<dt><a name="INTVAL_is_equal_num(PMC_*value)"
><b><code>INTVAL is_equal_num(PMC *value)</b></code></a></dt>
Returns whether the PMC is numerically equal to <code>*value</code>.
<dt><a name="INTVAL_is_equal_string(PMC_*value)"
><b><code>INTVAL is_equal_string(PMC *value)</b></code></a></dt>
Returns whether the PMC has string equality with <code>*value</code>.</dl>

<h2><a name="Logical_Methods"
>Logical Methods</a></h2>

<dl>
<dt><a name="PMC_*logical_or(PMC_*value,_PMC_*dest)"
><b><code>PMC *logical_or(PMC *value, PMC *dest)</b></code></a></dt>
Returns the result of the logical <code>OR</code> of <code>SELF</code> and <code>value</code>,
i.e.
returns <code>SELF</code> it is true or <code>value</code>: <code>dest</code> is alway ignored.
<dt><a name="_PMC_*logical_and(PMC_*value,_PMC_*dest)"
><b><code> PMC *logical_and(PMC *value, PMC *dest)</b></code></a></dt>
Returns the result of the logical <code>AND</code> of <code>SELF</code> and <code>value</code>,
i.e.
returns <code>value</code> if <code>SELF</code> is true else <code>SELF</code>.
<code>dest</code> is always ignored.
<dt><a name="PMC_*logical_xor(PMC_*value,_PMC_*dest)"
><b><code>PMC *logical_xor(PMC *value, PMC *dest)</b></code></a></dt>
Returns the result of the logical <code>XOR</code> of <code>SELF</code> and <code>*value</code>.
<dt><a name="PMC_*logical_not(PMC_*dest)"
><b><code>PMC *logical_not(PMC *dest)</b></code></a></dt>

<dt><a name="void_i_logical_not()"
><b><code>void i_logical_not()</b></code></a></dt>
Returns in <code>*dest</code> the result of the logical negation of the scalar and <code>*value</code>.
<dt><a name="INTVAL_defined()"
><b><code>INTVAL defined()</b></code></a></dt>
Always returns true.
<dt><a name="STRING_*substr_str(INTVAL_offset,_INTVAL_length)"
><b><code>STRING *substr_str(INTVAL offset, INTVAL length)</b></code></a></dt>
Returns the substring of length <code>length</code> of the scalar starting at <code>offset</code>.
<dt><a name="void_share_ro()"
><b><code>void share_ro()</b></code></a></dt>
Sets this PMC as shared and read&#45;only.</dl>
            </div> <!-- "mainbody" -->
            <div id="divider"></div>
            <div id="footer">
	        Copyright &copy; 2002-2009, Parrot Foundation.
            </div>
        </div> <!-- "wrapper" -->
    </body>
</html>