1.4.10 How to Write a Range Check Condition

Range checks compare values together to determine where a particular value lies. They are used to make sure values don't go out of or are in a certain range.

Take the employee eating, for example. You could feed them 200lbs of food and you'd probably go to jail. Instead, to make sure they aren't fed an insane amount of food, you can add a logic check that makes sure the amount of food is less than 10.

So if the amount of food passed in is less than 10, the Employee will gain weight and burp. If it is 10 or above the guest won't gain weight or burp.


But there's a problem. Sam has just found a 10lb steak he'd like to devour. Under this current logic he can only eat 9lbs and below. You could include 10lbs in two ways: you could either increase the value of the range....

...or you can change the operator to less than or equal to 10.