Matches in DBpedia 2014 for { <http://dbpedia.org/resource/Spaceship_operator> ?p ?o. }
Showing items 1 to 16 of
16
with 100 items per page.
- Spaceship_operator abstract "The spaceship operator, written <=>, is a binary relational operator that originated in the Perl programming language. Other languages, such as Ruby and Groovy, also support the spaceship operator. Unlike traditional equality operators, which will return 1 (true) or 0 (false) depending on whether the arguments are equal or unequal, the spaceship operator will return 1, 0, or −1 depending on the value of the left argument relative to the right argument. If the left argument is greater than the right argument, the operator returns 1. If the left argument is less than the right argument, the operator returns −1. If the two arguments are equal, the operator returns 0. If the two arguments cannot be compared (e.g. one of them is NaN), the operator returns undef.As a formula:In Perl, the <=> operator only performs numeric comparisons. For string-based comparison, the analogous cmp operator is used instead.In other languages (like PHP and C) the <=> operator is not needed for numbers because one can simply do b - a. Rather than returning exactly 1 (or -1), this will return a value greater (or less) than 0. But for those languages this doesn't matter and works fine.The spaceship operator is primarily used for comparisons in sorting.The spaceship operator takes its name because it resembles Darth Vader's fighter from Star Wars Episode IV: A New Hope [1]. The term is now commonly used and the operator is referred by the name within the Perl documentation.This operator is also used in ASCII-based mathematical notation to represent "less than, equal to or greater than", and is synonymous with the symbols ⋛ and ⋚. It can be used to test if the result of a calculation is actually a number.".
- Spaceship_operator wikiPageExternalLink Complex.html.
- Spaceship_operator wikiPageExternalLink Equality-Operators-equality-equal-equals-operator%2c-equality.
- Spaceship_operator wikiPageExternalLink ?node_id=45627.
- Spaceship_operator wikiPageID "11219750".
- Spaceship_operator wikiPageRevisionID "575266900".
- Spaceship_operator hasPhotoCollection Spaceship_operator.
- Spaceship_operator subject Category:Operators_(programming).
- Spaceship_operator subject Category:Perl.
- Spaceship_operator comment "The spaceship operator, written <=>, is a binary relational operator that originated in the Perl programming language. Other languages, such as Ruby and Groovy, also support the spaceship operator. Unlike traditional equality operators, which will return 1 (true) or 0 (false) depending on whether the arguments are equal or unequal, the spaceship operator will return 1, 0, or −1 depending on the value of the left argument relative to the right argument.".
- Spaceship_operator label "Spaceship operator".
- Spaceship_operator sameAs m.02r40tv.
- Spaceship_operator sameAs Q7572728.
- Spaceship_operator sameAs Q7572728.
- Spaceship_operator wasDerivedFrom Spaceship_operator?oldid=575266900.
- Spaceship_operator isPrimaryTopicOf Spaceship_operator.