1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
4
<LANGUAGE>eng</LANGUAGE>
6
<TYPE>Scilab Function</TYPE>
7
<DATE>April 1993</DATE>
8
<SHORT_DESCRIPTION name="funptr"> coding of primitives ( wizard stuff ) </SHORT_DESCRIPTION>
10
<CALLING_SEQUENCE_ITEM> [numptr] = funptr(name) </CALLING_SEQUENCE_ITEM>
15
<PARAM_NAME>name</PARAM_NAME>
17
<SP>: a string, the name of a primitive</SP>
21
<PARAM_NAME>numptr</PARAM_NAME>
23
<SP>: the internal routine number of the primitive</SP>
30
Utility function (for experts only) to get the internal routine number <VERB>numptr</VERB>
31
of the primitive <VERB>'name'</VERB>. <VERB>numptr</VERB> is formed from the interface
32
number <VERB>fun</VERB> and the routine number <VERB>fin</VERB> of the primitive in its interface
33
by <VERB>numptr = 100*fun + fin</VERB> (fin < 100). From <VERB>numptr</VERB> you can get
34
the interface number <VERB>fun = floor(numptr/100)</VERB> which may be useful to link a
35
dynamical interface with arguments passed by reference (see example section).</P>
39
// Suppose you want to load some codes via the dynamic
40
// loading facilities offers by addinter. By default
41
// arguments are passed by values but if you want to
42
// pass them by reference you can do the following
43
// (name being the scilab name of one of the interfaced
46
// addinter(files,spnames,fcts) // args passed by values
47
// num_interface = floor(funptr(name)/100)
48
// intppty(num_interface) // args now passed by reference
50
// Note that if you enter the following
54
// you will see all the interfaces working by reference