News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.

Post Reply  Post Thread 
testing presence of ML feature
Author Message

Posts: 81
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #1
RE: testing presence of ML feature

mikshaw Wrote:
It just occurred to me that testing the version string is not going to be as reliable as I'd hoped for a little while. The version string in 0.6 is "0.5.5", so until 0.6.5 it will continue to be a problem for this test. After that, testing for 0.6 will probably need to be explicitly discouraged.

Then the function should be changed a little ;-)

function minimal_version(minimal_version)
  local x=string.gmatch((murgaLua and murgaLua.version or "0"),"%d+") y=string.gmatch(minimal_version,"%d+")
  local t=function(x) return tonumber((x() or 0)) end
  local version=0; local min_version=0
  for i=1,3 do version=version*100+t(x); min_version=min_version*100+t(y) end
  if version<min_version then
    print("You must use a murgaLua version > "..minimal_version) os.exit(1) end



02-08-2008 01:25 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
testing presence of ML feature - mikshaw - 01-20-2008, 05:37 AM
RE: testing presence of ML feature - Juergen - 02-08-2008 01:25 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: