

Yet, Scilab permits all conceivable combinations of number of parameters and return values, including functions that have no parameters, or no return values.

The "Introduction to Scilab", SCI /doc/Intro.ps, solely explains functions that have one or more parameters, and return one or more values. Functions Without Parameters or Return Value The do-not-nest limitation is raised for one-liners, where nesting works without problems. The fingerprint of nested functions is error 37, "incorrect function at line. Should be avoided by using deff when defining bar. = intg(rmin, r0, integrand)Īs of Scilab version 2.6, nested functions do not work reliably, therefore, constructs like calculate endpoints of definite integral r -> infinity ) E0, mass M in a Morse potential of steepness s andĭeff('U = Umorse(r, steepness, depth)'. of vanishing potential for a point-like particle with kinetic energy (at Compute the round-trip time t, the minimum distance rmin and the point Most often these strings are given literally, for example,ĭeff('y = heavyside_theta(x)', 'if x function y = foo(x) -> y = 1.0 + x + 0.5*x^2 -> endfunction -> foo(4)īoth forms allow for nested function definitions – see the following section, Section 5.1.2.įunction = tauc(E0, M, s, D) Where function_head, function_body, and compile_flag are character strings. The first form uses the builtin function deffĭeff( function_head, function_body ) Scilab allows functions to be defined online, this is, at the command line, in two different forms.
