79605226

Date: 2025-05-04 01:31:21
Score: 6 🚩
Natty:
Report link

Thanks much Laurent! am having trouble understanding how OnlyEnforceIf works. I have spent days trying to understand it :(. I want to set an integer variable X[emp] to 5 whenever d[emp] >= 25. When d[emp]<25 I want X[emp] to be 10. Is this possible, and if so how?

A related question: in above, if d[emp] >= 25, I want to set Y[emp] to 5. And if d[emp] < 25 Y[emp] should be any value other than 5. Y is [emp] is declared to be an integer variable that can be between 0 and 50.

One more question if you don't mind. In your suggestion, what will be the value of d120 if X >= 25 and when X is < 25?

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): :(
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Prem Narasimhan