Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Relational operator
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Programming language construct}} {{Redirect|Comparison (computer programming)|comparison of files|File comparison}} {{Redirect|~{{=}}|the mathematical usage|approximation}} {{More citations needed|date=March 2022}} <!-- content well understood. -->{{Use mdy dates|date=June 2014}} In [[computer science]], a '''relational operator''' is a [[programming language]] construct or [[Operator (programming)|operator]] that tests or defines some kind of [[relation (mathematics)|relation]] between [[Binary function|two entities]]. These include numerical [[equality (mathematics)|equality]] (e.g., {{nowrap|5 {{=}} 5}}) and [[inequality (mathematics)|inequalities]] (e.g., {{nowrap|4 β₯ 3}}). In programming languages that include a distinct [[boolean data type]] in their [[type system]], like [[Pascal (programming language)|Pascal]], [[Ada (programming language)|Ada]], [[Python (programming language)|Python]] or [[Java (programming language)|Java]], these operators usually evaluate to true or false, depending on if the conditional relationship between the two [[operand]]s holds or not. In languages such as [[C (programming language)|C]], relational operators return the [[integer]]s 0 or 1, where 0 stands for false and any non-zero value stands for true. An [[expression (programming)|expression]] created using a relational operator forms what is termed a ''relational expression'' or a ''condition''. Relational operators can be seen as special cases of logical [[predicate (mathematical logic)|predicates]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)