Testing the iLogic Rukes for Ranges of Values
What about cases where mass is not limited to the exact values but may occur in several ranges of values? The following example will illustrate this case.
|Less than or equal to 100||1 in|
|Greater than 100 but less than or equal to 200||2 in|
|Greater than 200 but less than or equal to 300||3 in|
|Greater than 300 but less than or equal to 400||4 in|
|Greater than 400||6 in|
Let’s modify an existing rule. Open the iLogic Tree Editor, and double-click on Width_Rule to open it in the Rule Editor.
Modify the rule as follows:
bracket_width = 1
ElseIf mass > 100 And mass <= 200 Then
bracket_width = 2
ElseIf mass > 200 And mass <= 300 Then
bracket_width = 3
ElseIf mass > 300 And mass <= 400 Then
bracket_width = 4
bracket_width = 6
Here, we are checking for a range of values in each of the If statements. Click OK to close the Rule Editor.
Subsribe to Post Notifications