~ubuntu-branches/ubuntu/raring/scilab/raring-proposed

« back to all changes in this revision

Viewing changes to modules/functions/help/en_US/funptr.xml

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-30 14:42:38 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20120830144238-c1y2og7dbm7m9nig
Tags: 5.4.0-beta-3-1~exp1
* New upstream release
* Update the scirenderer dep
* Get ride of libjhdf5-java dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="UTF-8"?>
2
 
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="funptr">
3
 
  <refnamediv>
4
 
    <refname>funptr</refname>
5
 
    <refpurpose> coding of  primitives ( wizard stuff )  </refpurpose>
6
 
  </refnamediv>
7
 
  <refsynopsisdiv>
8
 
    <title>Calling Sequence</title>
9
 
    <synopsis>[numptr] = funptr(name)</synopsis>
10
 
  </refsynopsisdiv>
11
 
  <refsection>
12
 
    <title>Arguments</title>
13
 
    <variablelist>
14
 
      <varlistentry>
15
 
        <term>name</term>
16
 
        <listitem>
17
 
          <para>a string, the name of a primitive</para>
18
 
        </listitem>
19
 
      </varlistentry>
20
 
      <varlistentry>
21
 
        <term>numptr</term>
22
 
        <listitem>
23
 
          <para>the internal routine number of the primitive</para>
24
 
        </listitem>
25
 
      </varlistentry>
26
 
    </variablelist>
27
 
  </refsection>
28
 
  <refsection>
29
 
    <title>Description</title>
30
 
    <para>
31
 
      Utility function (for experts only) to get the internal routine number <literal>numptr</literal>
32
 
      of the primitive <literal>'name'</literal>. <literal>numptr</literal> is formed from the interface
33
 
      number <literal>fun</literal> and the routine number <literal>fin</literal> of the primitive in its interface
34
 
      by <literal>numptr = 1000*fun + fin</literal> (fin &lt; 1000). From  <literal>numptr</literal> you can get 
35
 
      the interface number <literal>fun = floor(numptr/1000)</literal> which may be useful to link a 
36
 
      dynamical interface with arguments passed by reference (see example section).
37
 
    </para>
38
 
  </refsection>
39
 
  <refsection>
40
 
    <title>Examples</title>
41
 
    <programlisting role="example"><![CDATA[ 
42
 
// Suppose you want to load some codes via the dynamic 
43
 
// loading facilities offers by addinter. By default 
44
 
// arguments are passed by values but if you want to 
45
 
// pass them by reference you can do the following 
46
 
// (name being the scilab name of one of the interfaced 
47
 
// routines) :
48
 
//
49
 
// addinter(files,spnames,fcts)  // args passed by values
50
 
// num_interface = floor(funptr(name)/1000)
51
 
// intppty(num_interface)  // args now passed by reference
52
 
//
53
 
// Note that if you enter the following
54
 
//
55
 
// intppty()                
56
 
//
57
 
// you will see all the interfaces working by reference
58
 
 ]]></programlisting>
59
 
  </refsection>
60
 
  <refsection role="see also">
61
 
    <title>See Also</title>
62
 
    <simplelist type="inline">
63
 
      <member>
64
 
        <link linkend="clearfun">clearfun</link>
65
 
      </member>
66
 
      <member>
67
 
        <link linkend="newfun">newfun</link>
68
 
      </member>
69
 
      <member>
70
 
        <link linkend="intppty">intppty</link>
71
 
      </member>
72
 
      <member>
73
 
        <link linkend="addinter">addinter</link>
74
 
      </member>
75
 
    </simplelist>
76
 
  </refsection>
77
 
</refentry>