Re: > vs gt

2018-07-28 Thread Brandon Allbery
If you really want a headache, go look at the revision history for vercmp() in the RPM repo. On Sat, Jul 28, 2018 at 4:08 PM ToddAndMargo wrote: > On 07/28/2018 08:26 AM, Brandon Allbery wrote: > > I think you can use Version.new on that and compare them reasonably > > directly? That said,

Re: > vs gt

2018-07-28 Thread ToddAndMargo
On 07/28/2018 08:26 AM, Brandon Allbery wrote: I think you can use Version.new on that and compare them reasonably directly? That said, comparison of version numbers is a bit of a minefield for exactly this reason: not everyone agrees on when to use string vs.  numeric comparison, or what to

Re: > vs gt

2018-07-28 Thread Brandon Allbery
I think you can use Version.new on that and compare them reasonably directly? That said, comparison of version numbers is a bit of a minefield for exactly this reason: not everyone agrees on when to use string vs. numeric comparison, or what to do when one is numeric and the other isn't. On Sat,

Re: > vs gt

2018-07-28 Thread ToddAndMargo
On 07/27/2018 11:27 PM, ToddAndMargo wrote: On Sat, Jul 28, 2018 at 1:54 AM ToddAndMargo > wrote:     Hi All,     Why does this work: if $CurlStr.chars > 200 {     But this does not? if $CurlStr.chars gt 200 {     79 was not larger than 200

Re: > vs gt

2018-07-28 Thread ToddAndMargo
On Sat, Jul 28, 2018 at 1:54 AM ToddAndMargo > wrote: Hi All, Why does this work: if $CurlStr.chars > 200 { But this does not? if $CurlStr.chars gt 200 { 79 was not larger than 200 Many thanks, -T On

Re: > vs gt

2018-07-27 Thread Brandon Allbery
> is numeric comparison: (79 > 200) is false. gt is string comparison: ("79" > "200") is true because "7" is lexically larger than "2". On Sat, Jul 28, 2018 at 1:54 AM ToddAndMargo wrote: > Hi All, > > Why does this work: > > if $CurlStr.chars > 200 { > > But this does not? > > if

> vs gt

2018-07-27 Thread ToddAndMargo
Hi All, Why does this work: if $CurlStr.chars > 200 { But this does not? if $CurlStr.chars gt 200 { 79 was not larger than 200 Many thanks, -T