Charles Greathouse on Sun, 20 Nov 2011 14:40:27 +0100

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Backward compatibility

I was trying to write a quick script that would work for both newer
(2.4.3 through 2.6.x) and older versions of gp.  For example, I would
like to use warning() in the new versions and a print statement in old
ones.  I thought it would be convenient to define

if(lex(version(),[2,4,3])<0,{warning(s:str)=print("Warning: "s)});

but this breaks in recent versions -- "variable name expected".  Is
there a better way to do this?

Charles Greathouse
Case Western Reserve University