Question: silently testing for the Maple version

(Tested on Maple 2021.1 and 2024.0, on Mac)

I want to write a Maple procedure that takes advantages of the latest features but doesn't break on older versions of Maple.

So I can write something like this:

   if version() >= VERSION then new_method else old_method end if

This works, but it has the problem that the version( ) command not only returns a version number but also writes three lines to the screen, like this:

 User Interface: 1794891
         Kernel: 1794891
        Library: 1794891

I don't want those lines to appear every time the procedure is used but I don't know how to make them go away.  Is there a way, or is there a better approach to achieving what I want?

Thanks, Brendan.

Please Wait...