[tw5] Re: negative numbers in RevealWidget comparison not ... mathematically accurate?

2021-11-22 Thread TW Tones
My Guess is its only problem is with Negatives as charlie suggested;

1 lt 10: <$reveal type="lt" default=1 text=10>yes

So adding to the documentation "compares positive numbers only" is 
sufficient to correct it, until perhaps it is improved!

It should be quite easy to swap the negatives for positives to make it 
work, even if you need to convert them for display as negative numbers, and 
reverse the conditions eg lt for gt.

Tones

On Monday, 22 November 2021 at 13:45:58 UTC+11 andres@gmail.com wrote:

> I might be missing something, but given this demo here:
>
>   0 gt -5: <$reveal type="gt" default=0  text=-5>yes
> -1 gt -5: <$reveal type="gt" default=-1 text=-5>yes
> 
> -5 gt -1: <$reveal type="gt" default=-5 text=-1>yes
> 
>  0 lt -5: <$reveal type="lt" default=0  text=-5>yes
> 
> -5 lt  0: <$reveal type="lt" default=-5 text=0>yes
> 
> -1 lt -5: <$reveal type="lt" default=-1 text=-5>yes
> 
> -5 lt -1: <$reveal type="lt" default=-5 text=-1>yes 
>
> I get the following output:
>
>  0 gt -5: yes
> -1 gt -5: 
> -5 gt -1: yes  <-- -5 is less than -1, not greater
>  0 lt -5: 
> -5 lt  0: yes
> -1 lt -5: yes  <-- -1 is greater than -5, not less
> -5 lt -1: 
>
> Is this a known issue?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f455a3ad-7846-45dc-b867-ba2640373f2an%40googlegroups.com.


[tw5] Re: negative numbers in RevealWidget comparison not ... mathematically accurate?

2021-11-22 Thread andres....@gmail.com
That do make sense. ListWidget will work for what I am doing as well... 
actually, not sure why I went with RevealWidget as I am using ListWidget 
for other comparisons elsewhere ...

*shrug*

Thanks for the answers!

On Monday, November 22, 2021 at 9:42:36 AM UTC jeremy...@gmail.com wrote:

> The issue here is that the reveal widget only performs string comparisons, 
> and doesn't understand numbers at all.
>
> More complex comparisons including numeric operations can be performed 
> with the list widget and filter.
>
> Best wishes
>
> Jeremy
>
> On Monday, November 22, 2021 at 3:56:53 AM UTC cj.v...@gmail.com wrote:
>
>> G'day, 
>>
>> I think gt and lt in reveal widgets, only works with positive integers.
>>
>> On Sunday, November 21, 2021 at 10:45:58 PM UTC-4 andres@gmail.com 
>> wrote:
>>
>>> I might be missing something, but given this demo here:
>>>
>>>   0 gt -5: <$reveal type="gt" default=0  text=-5>yes
>>> -1 gt -5: <$reveal type="gt" default=-1 text=-5>yes
>>> 
>>> -5 gt -1: <$reveal type="gt" default=-5 text=-1>yes
>>> 
>>>  0 lt -5: <$reveal type="lt" default=0  text=-5>yes
>>> 
>>> -5 lt  0: <$reveal type="lt" default=-5 text=0>yes
>>> 
>>> -1 lt -5: <$reveal type="lt" default=-1 text=-5>yes
>>> 
>>> -5 lt -1: <$reveal type="lt" default=-5 text=-1>yes 
>>>
>>> I get the following output:
>>>
>>>  0 gt -5: yes
>>> -1 gt -5: 
>>> -5 gt -1: yes  <-- -5 is less than -1, not greater
>>>  0 lt -5: 
>>> -5 lt  0: yes
>>> -1 lt -5: yes  <-- -1 is greater than -5, not less
>>> -5 lt -1: 
>>>
>>> Is this a known issue?
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/adc96f88-52d5-4779-a2f4-3888b41e453an%40googlegroups.com.


[tw5] Re: negative numbers in RevealWidget comparison not ... mathematically accurate?

2021-11-22 Thread Jeremy Ruston
The issue here is that the reveal widget only performs string comparisons, 
and doesn't understand numbers at all.

More complex comparisons including numeric operations can be performed with 
the list widget and filter.

Best wishes

Jeremy

On Monday, November 22, 2021 at 3:56:53 AM UTC cj.v...@gmail.com wrote:

> G'day, 
>
> I think gt and lt in reveal widgets, only works with positive integers.
>
> On Sunday, November 21, 2021 at 10:45:58 PM UTC-4 andres@gmail.com 
> wrote:
>
>> I might be missing something, but given this demo here:
>>
>>   0 gt -5: <$reveal type="gt" default=0  text=-5>yes
>> -1 gt -5: <$reveal type="gt" default=-1 text=-5>yes
>> 
>> -5 gt -1: <$reveal type="gt" default=-5 text=-1>yes
>> 
>>  0 lt -5: <$reveal type="lt" default=0  text=-5>yes
>> 
>> -5 lt  0: <$reveal type="lt" default=-5 text=0>yes
>> 
>> -1 lt -5: <$reveal type="lt" default=-1 text=-5>yes
>> 
>> -5 lt -1: <$reveal type="lt" default=-5 text=-1>yes 
>>
>> I get the following output:
>>
>>  0 gt -5: yes
>> -1 gt -5: 
>> -5 gt -1: yes  <-- -5 is less than -1, not greater
>>  0 lt -5: 
>> -5 lt  0: yes
>> -1 lt -5: yes  <-- -1 is greater than -5, not less
>> -5 lt -1: 
>>
>> Is this a known issue?
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3c61d952-bc51-4732-9da9-f32d71c1d158n%40googlegroups.com.


[tw5] Re: negative numbers in RevealWidget comparison not ... mathematically accurate?

2021-11-21 Thread Charlie Veniot
G'day, 

I think gt and lt in reveal widgets, only works with positive integers.

On Sunday, November 21, 2021 at 10:45:58 PM UTC-4 andres@gmail.com 
wrote:

> I might be missing something, but given this demo here:
>
>   0 gt -5: <$reveal type="gt" default=0  text=-5>yes
> -1 gt -5: <$reveal type="gt" default=-1 text=-5>yes
> 
> -5 gt -1: <$reveal type="gt" default=-5 text=-1>yes
> 
>  0 lt -5: <$reveal type="lt" default=0  text=-5>yes
> 
> -5 lt  0: <$reveal type="lt" default=-5 text=0>yes
> 
> -1 lt -5: <$reveal type="lt" default=-1 text=-5>yes
> 
> -5 lt -1: <$reveal type="lt" default=-5 text=-1>yes 
>
> I get the following output:
>
>  0 gt -5: yes
> -1 gt -5: 
> -5 gt -1: yes  <-- -5 is less than -1, not greater
>  0 lt -5: 
> -5 lt  0: yes
> -1 lt -5: yes  <-- -1 is greater than -5, not less
> -5 lt -1: 
>
> Is this a known issue?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/dfbfd13a-94c2-49f8-a885-8642c36b1ee7n%40googlegroups.com.