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

« back to all changes in this revision

Viewing changes to modules/functions/help/en_US/library.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
 
<!--
3
 
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4
 
 * Copyright (C) ????-2008 - INRIA
5
 
 *
6
 
 * This file must be used under the terms of the CeCILL.
7
 
 * This source file is licensed as described in the file COPYING, which
8
 
 * you should have received as part of this distribution.  The terms
9
 
 * are also available at
10
 
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11
 
 *
12
 
 -->
13
 
<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="library">
14
 
  <refnamediv>
15
 
    <refname>library</refname>
16
 
    <refpurpose> library datatype description
17
 
    </refpurpose>
18
 
  </refnamediv>
19
 
  <refsynopsisdiv>
20
 
    <title>Calling Sequence</title>
21
 
    <synopsis/>
22
 
  </refsynopsisdiv>
23
 
  <refsection>
24
 
    <title>Description</title>
25
 
    <para>
26
 
      A library is a data type with type number 14. It contains a path-name
27
 
      and a set of names. It allows automatic loading of variables using the
28
 
      following algorithm:
29
 
    </para>
30
 
    <para>
31
 
      Suppose the Scilab user references the variable named <literal>foo</literal>.
32
 
      Scilab first looks if <literal>foo</literal> is the name of a primitive or of an
33
 
      already defined variable. If not, it looks for <literal>foo</literal> sequentially
34
 
      (the newest first) in all defined library .
35
 
    </para>
36
 
    <para>
37
 
      Suppose <literal>foo</literal> belongs to the set of names of the library <literal>xlib</literal>
38
 
      then Scilab tries to load the file
39
 
      &lt;xlib-path-name&gt;/foo.bin. &lt;xlib-path-name&gt;/foo.bin must have been
40
 
      created using the <literal>save</literal> function
41
 
    </para>
42
 
    <para>
43
 
      Library are often used for collection of functions, but they can also
44
 
      be used for any collection of scilab variables
45
 
    </para>
46
 
    <para>
47
 
      If a function is defined in more than one library, the default search
48
 
      algorithm loads thode contained in the newest. It possible to force
49
 
      the use of a specific library using dot notation:
50
 
    </para>
51
 
    <para>
52
 
      <literal>xlib.foo</literal> loads the variable <literal>foo</literal> contained in <literal>xlib</literal>.
53
 
      if <literal>foo</literal> is a function 
54
 
      and <literal>xlib.foo(args)</literal> executes the functions
55
 
    </para>
56
 
  </refsection>
57
 
  <refsection>
58
 
    <title>Examples</title>
59
 
    <programlisting role="example"><![CDATA[ 
60
 
// elemlib is a predefined library
61
 
elementary_functionlib //displays the contents of the library
62
 
A=rand(3,3);
63
 
cosm(A) //loads cosm and executes it
64
 
whos -name cosm // now cosm is a variable
65
 
elementary_functionlib.sinm //loads sinm from the library
66
 
elementary_functionlib.cosm(A) //reloads cosm and executes it
67
 
 ]]></programlisting>
68
 
  </refsection>
69
 
  <refsection role="see also">
70
 
    <title>See Also</title>
71
 
    <simplelist type="inline">
72
 
      <member>
73
 
        <link linkend="lib">lib</link>
74
 
      </member>
75
 
      <member>
76
 
        <link linkend="string">string</link>
77
 
      </member>
78
 
      <member>
79
 
        <link linkend="load">load</link>
80
 
      </member>
81
 
      <member>
82
 
        <link linkend="save">save</link>
83
 
      </member>
84
 
    </simplelist>
85
 
  </refsection>
86
 
</refentry>