Comparison operators

OperatorOperationExampleExample Answer
=बराबर${age} = 25true या false
!=बराबर नहीं${age} != 25true या false
>से बड़ा${age} > 25true या false
>=से बड़ा या बराबर${age} >= 25true या false
<से छोटा${age} < 25true या false
<=से छोटा या बराबर${age} <= 25true या false

ऊपर के उदाहरणों में, ${age} वर्तमान field के मूल्य को represent करता है, और operator का उपयोग इसे 25 मूल्य से तुलना करने के लिए किया जाता है। constraint true या false के रूप में evaluate होगी, इस पर निर्भर करते हुए कि तुलना संतुष्ट है या नहीं।

Logical operators

Logical operators का उपयोग constraints में multiple expressions को combine करने के लिए किया जाता है। यहाँ कुछ सामान्यतः उपयोग किए जाने वाले logical operators हैं, उनके operations और examples के साथ:

OperatorOperationExample
orयदि कोई भी expression true है तो true return करता है${age} = 3 or ${age} = 4
andकेवल तभी true return करता है जब दोनों expressions true हों${age} > 3 and ${age} < 5
not()यदि expression true नहीं है तो true return करता हैnot(${age} > 3 and ${age} < 5)

ऊपर के उदाहरणों में, ${age} वर्तमान field के मूल्य को represent करता है, और logical operators का उपयोग expressions को combine करने के लिए किया जाता है। constraint निर्दिष्ट conditions के आधार पर true या false के रूप में evaluate होगी।

उदाहरण 1:

उदाहरण 2:

उदाहरण 3:

क्या यह पृष्ठ सहायक था?