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
|
getf Scilab Group Scilab Function getf
NAME
getf - defining a function from a file
CALLING SEQUENCE
getf(file-name [,opt])
PARAMETERS
filename : Scilab string.
opt : optional character string
"c" : loaded functions are "compiled" to be more efficient
(default)
"n" : loaded functions are not "compiled"
"p" : loaded functions are "compiled" and prepared for
profiling (see profile)
DESCRIPTION
loads one or several functions (see functions) defined in the file
'file-name'. The string opt='n' means that the functions are not
compiled (pre-interpreted) when loaded. This can be useful for some
debugging purpose (see comp). By default, functions are compiled when
loaded (i.e. opt='c' is used).
In the file a function must begin by a "syntax definition" line as
follows:
function [y1,...,yn]=foo(x1,...,xm)
followed by a sequence of scilab instructions.
The "syntax definition" line gives the "full" calling syntax of this
function. The yi are output variables calculated as functions of input
variables xi and variables existing in Scilab when the function is
executed. Shorter input or output argument list may be used.
Many functions may be written in the same file. A function is terminated
by an endfunction keyword. For compatibility with previous versions a
function may also be terminated by the following function keyword or the
EOF mark.
REMARK
getf is an old way for loading functions into scilab from a file, If
functions in a file are terminated by an endfunction keyword, the file
maybe loaded using the exec function instead of getf. In this case
default option opt is used.
EXAMPLE
getf('SCI/macros/xdess/plot.sci')
getf SCI/macros/xdess/plot.sci
SEE ALSO
functions, function, genlib, getd, exec, edit, comp
|