Step function
The following jsl code:
i=97;
print(i,Step( i, 20, "error1", 95, "M03", 125, "error2", 185, "M06", 215, "error3", 370, "M12", 400, "error4" ));
produces:
97
"error1"
as output in the log.
Shouldn't it produce:
97
"M03"
instead, since 95 is the greatest x in the list that is <= 97?
Can anybody advise what I'm doing wrong?
Thanks.