DADiSP Worksheet Functions > Function Categories > Control Flow > RETURN
Terminates an iteration or a function, and optionally returns a value.
RETURN(val1, val2, ..., valN)
valN |
- |
Optional. Zero or more strings, scalars, series or tables. |
The SPL function, IntgVal, returns the max of the integral of the series, s.
Consider myfunction defined as follows:
(a,b) = myfunction(10)
assigns a the value 10 and b the value 100
a = myfunction(10)
only assigns a.
AVGHIST is an example of an SPL routine to calculate a histogram where the X values are the average of the points within a bin: Either the histogram as a whole or the separate X and Y components can be returned.
RETURN is for use in SPL files. It can be used with or without optional return values.
Unlike C/C++, the SPL RETURN function can return multiple values.
See OUTARGC to determine the number of requested output return values.