[Jprogramming] testing for J version or later
Raul Miller
rauldmiller at gmail.com
Fri Dec 22 04:47:37 UTC 2023
Hmm... only if we're updating stdlib, supporting versions of J back to
4.0.1. A worthwhile effort, though, if someone was actually tackling
those issues.
Otherwise, I think an idiom would be about as good as it gets.
--
Raul
On Thu, Dec 21, 2023 at 9:24 PM Ian Clark <earthspotty at gmail.com> wrote:
>
> For those of us digital archaeologists running back-levels of J, it would
> be nice to have a robust test for a given version of J or later which
> tolerates versions down to 4.01, say.
>
>
> What represents best-practice? The best I can come up with is:
>
> jversion=: 3 : 0
>
> ". 'j.' -.~ '/' taketo 9!:14''
>
> )
>
>
>
> which reliably returns a 3-digit integer, permitting (say):
>
> if. 900 <: jversion'' do. …
>
>
> A candidate for stdlib?
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list