ttwo(x), which multiplies its argument by . After the definition it can be used like any other Jasymca function.
>> function y=ttwo(x) y=2*x; end >> ttwo(3.123) ans = 6.246Following the keyword
functionis the prototype with a return variable
y. This replaces the construct
return yof other programming languages.
If functions are to be reused later, they should be written to a textfile
and saved somewhere in Jasymcas searchpath. The filename must be the
function name extended by ``.m'', in the present example
In subsequent sessions the function
ttwo can be used without
separately loading the file. Several installed functions of Jasymca
are provided using this mechanism.