Clamp a number between two values.

This statement returns no value, it directly updates the given variable.

limit ?a min min max max
?avariable
minmin value
maxmax value
Sourcefor 1 to 5 as ?n ?m = ?n limit ?m min 2 max 4 print ?m next Execution2 2 3 4 4