<sect1 id="as_value">
  <title>The <emphasis>as_value</emphasis> Object Type</title>
  <para>
    The <emphasis>as_value</emphasis> class is used throughout
    the interpreter to create generic objects to hold data.
  </para>
  
  <sect2 id="data_types">
    <title>Data Types</title>
    <para>
      The following data types are supported:
      <emphasis>NULLTYPE</emphasis>,
      <emphasis>BOOLEAN</emphasis>, <emphasis>STRING</emphasis>,
      <emphasis>NUMBER</emphasis>, <emphasis>OBJECT</emphasis>,
      <emphasis>AS_FUNCTION</emphasis>, and 
      <emphasis>MOVIECLIP</emphasis> (sprite).  
      The type <emphasis>C_FUNCTION</emphasis> is being deprecated.
    </para>
  </sect2>
  
  <sect2 id="is_methods">
    <title>Determining the Type</title>
    <para>
      Several methods allow you to determine if a value stored in
      <emphasis>as_value</emphasis> is of a specific type.  These
      follow the form of <emphasis>is_TYPE</emphasis>, for example
      <emphasis>is_as_function()</emphasis> and 
      <emphasis>is_number()</emphasis>.  In general, the type names
      match the <link linkend="data_types">data types</link> listed
      above, with the exception of the type <emphasis>MOVIECLIP</emphasis>
      which has a method <emphasis>is_sprite()</emphasis>.
    </para>
  </sect2>
  
  <sect2 id="to_methods">
    <title>Fetching the Value</title>
    <para>
      Another set of methods will return a representation of
      the value as a particular type.  They follow the
      <emphasis>to_TYPE</emphasis> naming convention.  Examples
      are <emphasis>to_number()</emphasis> and
      <emphasis>to_bool()</emphasis>.  The type names are as 
      <link linkend="data_types">listed</link> earlier, except for
      <emphasis>MOVIECLIP</emphasis>, which uses 
      <emphasis>to_sprite()</emphasis>.
    </para>
  </sect2>
  
  <sect2 id="set_methods">
    <title>Setting the Value and Type</title>
    <para>
      Finally, there is the <emphasis>set_TYPE</emphasis> series
      of methods.  They change the type to the type specified in
      the method name, and set the value to the one given as an
      argument.  It is also possible to accomplish the same thing
      with the <emphasis>=</emphasis> operator.  Again, type names
      match those <link linkend="data_types">named earlier</link>,
      except in the case of <emphasis>MOVIECLASS</emphasis>.  Its
      method is called <emphasis>set_sprite()</emphasis>.
    </para>
  </sect2>
  
  <sect2 id="further_as_value_reading">
    <title>Further Reading</title>
    <para>
      Please refer to <emphasis>as_value.h</emphasis> or the
      Doxygen documentation (see 'Processing The Documentation'
      in the &appname; manual for instructions on generating
      documents with Doxygen) for more information
      about which methods are available for the
      <emphasis>as_value</emphasis> object.
    </para>
  </sect2>
  
</sect1>
