Order

Order[expr1,expr2]

gives 1 if expr1 is before expr2 in canonical order, and -1 if expr1 is after expr2 in canonical order. It gives 0 if expr1 is identical to expr2.

Details

  • Order uses canonical order as described in the notes for Sort.

Examples

open allclose all

Basic Examples  (1)

Applications  (1)

Find which tuples are in order:

Possible Issues  (1)

Order operates structurally, not by numerical value:

Wolfram Research (1988), Order, Wolfram Language function, https://reference.wolfram.com/language/ref/Order.html.

Text

Wolfram Research (1988), Order, Wolfram Language function, https://reference.wolfram.com/language/ref/Order.html.

CMS

Wolfram Language. 1988. "Order." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Order.html.

APA

Wolfram Language. (1988). Order. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Order.html

BibTeX

@misc{reference.wolfram_2024_order, author="Wolfram Research", title="{Order}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Order.html}", note=[Accessed: 10-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_order, organization={Wolfram Research}, title={Order}, year={1988}, url={https://reference.wolfram.com/language/ref/Order.html}, note=[Accessed: 10-October-2024 ]}