PacletNewerQ

PacletNewerQ[paclet1,paclet2]

returns True if paclet1 has a higher version number than paclet2, and False otherwise.

Details

  • The arguments paclet1 and paclet2 can be PacletObject expressions or raw version strings like "1.0".
  • When comparing two PacletObject expressions, PacletNewerQ always returns False if the paclets have different names (Version 2.0 of the paclet named Foo is not seen as "newer" than Version 1.0 of the paclet named Bar).
  • Paclet version numbers are always strings, not actual numbers, with up to five digit blocks separated by period characters, like "1", "2.0", "2.0.0", "1.2.123.5", etc.
  • Paclet version numbers cannot include letters, as in "1.0a".
  • Paclet version numbers are compared using the standard version number ordering convention, so that "1.10" is higher than "1.9".
  • Paclet version numbers are of paramount importance in the Wolfram System, with the highest version number of a given paclet being the one that is automatically used.
  • PacletNewerQ is primarily for paclet developers and advanced users who want a way to manually compare version numbers.

Examples

Basic Examples  (5)

There are two versions of ExamplePaclet on the Wolfram paclet server:

PacletFindRemote returns paclets sorted in decreasing version order, so the first one in the result has a higher version than the second:

Compare version numbers directly as strings:

PacletNewerQ returns False for version numbers that are equal:

Trailing zeros are ignored in version number comparisons:

PacletNewerQ always returns False for paclets that have different names:

A direct version number comparison shows that the J/Link version is higher:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_pacletnewerq, author="Wolfram Research", title="{PacletNewerQ}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/PacletNewerQ.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_pacletnewerq, organization={Wolfram Research}, title={PacletNewerQ}, year={2020}, url={https://reference.wolfram.com/language/ref/PacletNewerQ.html}, note=[Accessed: 22-November-2024 ]}