1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry version="5.0-subset Scilab" xml:id="funptr" xml:lang="en"
xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:ns5="http://www.w3.org/1999/xhtml"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:db="http://docbook.org/ns/docbook">
<info>
<pubdate>$LastChangedDate$</pubdate>
</info>
<refnamediv>
<refname>funptr</refname>
<refpurpose>codificao de primitivas </refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Seqncia de Chamamento</title>
<synopsis>[numptr] = funptr(name)</synopsis>
</refsynopsisdiv>
<refsection>
<title>Parmetros</title>
<variablelist>
<varlistentry>
<term>name</term>
<listitem>
<para>string, nome de uma primitiva </para>
</listitem>
</varlistentry>
<varlistentry>
<term>numptr</term>
<listitem>
<para>o nmero de rotina interno da primitiva</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Descrio</title>
<para>Fuo utilitria (para usurios mais experientes apenas) para
retornar o nmero de rotina interno <literal>numptr</literal> da primitiva
<literal>'name'</literal>. <literal>numptr</literal> formado a partir do
nmero de interface <literal>fun</literal> e do nmero de rotina
<literal>fin</literal> da primitiva em sua interface por <literal>numptr =
100*fun + fin</literal> (fin < 100). De <literal>numptr</literal>
pode-se obter o nmero de interface <literal>fun = floor(numptr/100)
</literal>que pode ser til para ligar uma interface dinmica com seus
argumentos passados por referncia (ver seo de exemplos).</para>
</refsection>
<refsection>
<title>Exemplos</title>
<programlisting role="example"><![CDATA[
// Suponha que voc queira carregar alguns cdigos atravs
// das facilidades de carregamento dinmico oferecidas por addinter. Por padro
// os argumentos so passados por valores, mas se voc quiser
// pass-los por referncia, voc pode fazer o seguinte
// (nome sendo o nome scilab de uma das rotinas com
// interface) :
//
// addinter(files,spnames,fcts) // argumentos passados por valores
// num_interface = floor(funptr(nome)/100)
// intppty(num_interface) // argumentos agora passados por referncia
//
// Note que se voc digitar o seguinte
//
// intppty()
//
// voc ver todas as interfaces funcionando por referncia
]]></programlisting>
</refsection>
<refsection>
<title> Ver Tambm </title>
<simplelist type="inline">
<member><link linkend="clearfun">clearfun</link></member>
<member><link linkend="newfun">newfun</link></member>
<member><link linkend="intppty">intppty</link></member>
<member><link linkend="addinter">addinter</link></member>
</simplelist>
</refsection>
</refentry>
|