~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/functions/lib.cat

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
lib              Scilab Group              Scilab Function              lib
2
 
   
3
 
  
4
 
NAME
5
 
   lib - library definition 
6
 
  
7
 
CALLING SEQUENCE
8
 
 xlib = lib('lib-dir')
9
 
   
10
 
  
11
 
PARAMETERS
12
 
   lib-dir: character string 
13
 
  
14
 
DESCRIPTION
15
 
   lib-dir is a character string defining a directory that contains compiled
16
 
  Scilab function (.bin) files.  In addition to these files lib-dir must
17
 
  have a file called names, that contains the names of the functions
18
 
  defined in lib-dir.  On success, all functions in lib-dir are available
19
 
  from within Scilab.  They are loaded on demand when called for the first
20
 
  time.  Binary files can be created from within Scilab with the command
21
 
  save.  Scilab's standard libraries are defined using lib on the
22
 
  SCIDIR/macros/* subdirectories.  As an example, given the following
23
 
  definitions
24
 
  
25
 
     deff('z = myplus(x, y)', 'z = x + y')
26
 
     deff('z = yourplus(x, y)', 'x = x - y')
27
 
     lib_dir = '/home/joeuser/myscidir'
28
 
   myplus and yourplus are compiled into lib_dir with the commands
29
 
  
30
 
     save(lib_dir + '/myplus.bin', myplus)
31
 
     save(lib_dir + '/yourplus.bin', yourplus)
32
 
   A library can now be created from the two .bin files with the command
33
 
  
34
 
         xlib = lib(lib_path + '/')
35
 
   xlib is a Scilab variable of type "library".  A library variable usually
36
 
  is saved for later loading, either on-line or from the user-specific
37
 
  startup file ($HOME/.scilab). 
38
 
  
39
 
RESTRICTIONS
40
 
   Scilab tacitly assumes that file foo.bin defines only a single function
41
 
  named foo. 
42
 
  
43
 
SEE ALSO
44
 
   genlib, save, deff, getf, whereis
45