1
.TH macro 1 "April 1993" "Scilab Group" "Scilab Function"
4
macro - Scilab procedure and Scilab object
6
Macros are Scilab procedures ("macro", "function" and "procedure"
7
have the save meaning). Usually, they are defined
8
in files with an editor and loaded into Scilab by \fVgetf\fR or through
11
They can also be defined on-line (see \fVdeff\fR).
12
A file which contains a macro must begin as follows:
14
function [y1,...,yn]=foo(x1,...,xm)
16
The \fVyi\fR are output variables calculated as functions of
17
input variables and variables existing in Scilab
18
when the macro is executed.
19
A macro can be compiled for faster execution. Collections
20
of macros can be collected in libraries.
21
Macros which begin with \fV%\fR sign (e.g. \fV%foo\fR) and whose
22
arguments are lists are used to perform specific
23
operations: for example, \fVz=%rmr(x,y)\fR is equivalent
24
to \fVz=x*y\fR when \fVx\fR and \fVz\fR are rationals
25
(i.e. \fVx=list('r',n,d,[])\fR with \fVn\fR and \fVd\fR polynomials).