function [y1,...,yn]=foo(x1,...,xm) . . .where foo is the function name. The xi's are the input parameters and the the yj's are the output parameters, and the three vertical dots represent the set of instructions performed by the function to evaluate the yj's, given the xi's. Inputs and ouputs parameters can be any Scilab object (including functions themeselves).
Functions are Scilab objects and should not be considered as files. To be used in Scilab, functions defined in files must be loaded by the command getf(filename). If the file filename contains the function foo, the function foo can be executed only if it has been previously loaded by the command getf(filename). A file may contain several functions. Functions can also be defined ``on line'' by the command deff. This is useful if one wants to define a function as the output parameter of a other function.
Collections of functions can be organized as libraries (see lib command). Standard Scilab librairies (linear algebra, control,...) are defined in the subdirectories of SCIDIR/macros/.