> On 28 Apr 2016, at 22:13, Pablo Rodriguez <oi...@gmx.es> wrote:
> 
> On 04/28/2016 05:06 PM, dr. Hans van der Meer wrote:
>> Why is there anexpression error here? I would expect that the expression
>> number(-10000101) evaluates to a negative number taking part in the
>> comparsion. It looks as if the minus sign is not seen as an unary minus,
>> while -10000101 should have be evaluated by Lua's tonumber(-10000101).
>> 
>> relevant code snippet is:
>> \xmlfilter{#1}{lpath[number(@date) <= number(-10000101)]/command(...)
> 
> Sorry, Hans, I guess my question will be stupid, but why don’t use
> "tonumber(-10000101)"?

It is convenient to use positive numbers for dates after the year 0: AD = Anno 
Domine,
and negative numbers for years before: BC = Before Christ.
Comparing dates is easy in both eras.

> 
> I wouldn’t get it, even with a minimal sample, but xml-mkiv.pdf includes
> the shortcut for this function.
> 
> Just in case it might even help ;-),

Has to wait until tomorrow, because it is already late in the evening.

Hans van der Meer




___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to