This function takes 3 integer values as arguments and checks whether the 1st integer value is in the range between the two integer values provided by the 2nd and 3rd arguments. The valid range includes the values of the 2nd and 3rd arguments.

Function Prototype



Argument Name Data Type Description
??needle?? Integer Number The value that is going to be checked whether it is in range.
??low?? Integer Number The smallest value of the valid range (including this value).
??high?? Integer Number The highest value of the valid range (including this value).

Return Value

Description Data Type
Returns true (1) in case the value is in the allowed range, false (0) otherwise. Integer Number


The following example prints the result of some example argument values to the terminal as soon as the script is loaded.

on init message("in_range(1,4,9) = " & in_range(1,4,9)) message("in_range(5,4,9) = " & in_range(5,4,9)) message("in_range(9,4,9) = " & in_range(9,4,9)) message("in_range(10,4,9) = " & in_range(10,4,9)) end on


Since LinuxSampler 2.0.0.svn36.