<!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 - Generic undefined value</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> » <a href="../../../html/pmc.html">PMCs</a> » Generic undefined value </div> <h1><a name="NAME" >NAME</a></h1> <p>src/pmc/undef.pmc - Generic undefined value</p> <h1><a name="DESCRIPTION" >DESCRIPTION</a></h1> <p>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.</p> <h2><a name="Methods" >Methods</a></h2> <dl> <dt><a name="void_set_pmc(PMC_*other)" ><b><code>void set_pmc(PMC *other)</b></code></a></dt> Sets the current PMC to <code>*other</code> by first changing the current PMC to the appropriate type. <dt><a name="void_assign_pmc(PMC_*other)" ><b><code>void assign_pmc(PMC *other)</b></code></a></dt> Assigns the PMC to the value of <code>*other</code> by first changing the PMC to the appropriate type. <dt><a name="INTVAL_get_integer()" ><b><code>INTVAL get_integer()</b></code></a></dt> Returns 0. <dt><a name="INTVAL_defined()" ><b><code>INTVAL defined()</b></code></a></dt> Returns 0. <dt><a name="void_set_integer_native(INTVAL_value)" ><b><code>void set_integer_native(INTVAL value)</b></code></a></dt> Morphs the current PMC to an <code>Integer</code> and sets the value from <code>value</code>. <dt><a name="FLOATVAL_get_number()" ><b><code>FLOATVAL get_number()</b></code></a></dt> Returns 0.0. <dt><a name="void_set_number_native(FLOATVAL_value)" ><b><code>void set_number_native(FLOATVAL value)</b></code></a></dt> Morphs the current PMC to a <code>Float</code> and sets the value from <code>value</code>. <dt><a name="STRING_*get_string()" ><b><code>STRING *get_string()</b></code></a></dt> Returns an empty string. <dt><a name="void_set_string_native(STRING_*value)" ><b><code>void set_string_native(STRING *value)</b></code></a></dt> Morphs the current PMC to a <code>String</code> and sets the value from <code>value</code>. <dt><a name="INTVAL_get_bool()" ><b><code>INTVAL get_bool()</b></code></a></dt> Returns 0. <dt><a name="INTVAL_logical_not()" ><b><code>INTVAL logical_not()</b></code></a></dt> Returns 1. <dt><a name="void_share()" ><b><code>void share()</b></code></a></dt> Unknown. (TODO) <dt><a name="PMC_*share_ro()" ><b><code>PMC *share_ro()</b></code></a></dt> Unknown. (TODO) <dt><a name="PMC_*clone()" ><b><code>PMC *clone()</b></code></a></dt> Clones the current Undef PMC. <dt><a name="INTVAL_is_equal(PMC_*value)" ><b><code>INTVAL is_equal(PMC *value)</b></code></a></dt> Returns 1 if the <code>*value</code> is an Undef PMC, 0 otherwise.</dl> </div> <!-- "mainbody" --> <div id="divider"></div> <div id="footer"> Copyright © 2002-2009, Parrot Foundation. </div> </div> <!-- "wrapper" --> </body> </html>