Subject: FVWM: Detecting FVWM version

From: Scott Smedley <[email-masked]>
Date: Thu, 1 Jul 2004 23:08:54 +1000

Hi all,

The "Test" command allows me to take an action if I'm
running a specific version of FVWM. ie:

Test (Version 2.5.12) Echo yup

What'd I'd like is to take an action if the FVWM version is
GREATER THAN a specific version.

ie. This is illegal syntax, but shows what I'd like to do.

Test (Version >= 2.5.12) Echo yup

Anyone know how I could do something like that?

SCoTT. :)
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dan Espen <[email-masked]>
Date: Thu, 01 Jul 2004 09:22:15 -0400

> Anyone know how I could do something like that?

Use $[version.num] in a piperead.
You will need to parse the result into individual numbers in order
to do arithmetic compares.

-- 
Dan Espen                           E-mail: [email-masked]

---

From: Scott Smedley <[email-masked]>
Date: Thu, 1 Jul 2004 23:33:14 +1000

Hi Dan, :)

> to do arithmetic compares.

Hehe! That's what I figured - I was hoping there was a cleaner way. :)

I wonder if we should create a new version variable like Perl does
to aid in these sorts of comparisons?

ie. 2.005012

Hmmm, maybe not. I'm not sure anyone else would find it useful.

SCoTT. :)

---

From: Mikhael Goikhman <[email-masked]>
Date: Fri, 2 Jul 2004 11:48:20 +0000

> Hmmm, maybe not. I'm not sure anyone else would find it useful.

No, we should just implement Version ">=", ">", "==", "<", "<=" syntax.
It is in my todo list somewhere in the middle. Feel free to implement it.

Regards,
Mikhael.

---

From: Scott Smedley <[email-masked]>
Date: Thu, 1 Jul 2004 23:33:14 +1000

Hi Dan, :)

ie. 2.005012

SCoTT. :)