#86 gdl_version_ge: utility to check order of GDL versions


Since GDL is still in very active development, it can be useful
to execute something contingent on whether or not the GDL version
is recent enough. A fallback block can be used if the version
is too old for the desired feature. As of (at least), gdl-0.9.0, we can use
string(!GDL,/print,format='(a)') to get the version string.
However, alphabetical comparison of versions fails with '~rc' versions
(because '.' lt '~' on at least my system, so '0.9.0' lt '0.9~rc3'), which is wrong.
Also, if a component of the GDL version numbers ever gets
beyond 9, then we would have e.g. '0.9.13' lt '0.9.2' , which again is wrong.

It would presumably be possible to port something highly intelligent
and well-tested, used by GPL packet management systems
(e.g. aptitude?) into GDL, but pending that, i wrote up a quick hack

This is complementary to Laurent's running_gdl routine in the requested
feature list:

[Version 1.1 of running_gdl should be updated to report details of the
!GDL string, but the changes to make are reasonably easy, and i'll comment
over on that thread.]

Here is a similar 2005 request, which should be linked here, or else



  • Boud Roukema

    Boud Roukema - 2010-12-30

    version 1.0 of gdl_version_ge and associated routines

  • Boud Roukema

    Boud Roukema - 2010-12-30

    The 2005 request *is* closed - so ignore the last paragraph of "Details".

  • Sylwester Arabas

    I do agree it might be a useful utility in some cases, but do we see a reason to put it into the GDL source tree? Please do comment.


  • Sylwester Arabas

    • status: open --> pending
  • SourceForge Robot

    • status: pending --> closed
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks