It is possible to define a function directly in the Scilab environment, however, the most convenient way is to create a file containing the function with a text editor. In this section we describe the structure of a function and several Scilab commands which are used almost exclusively in a function environment.