ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* integer displayed as .0 float in Lua-5.3
@ 2018-08-09 18:02 Pablo Rodriguez
  2018-08-09 18:12 ` Wolfgang Schuster
  0 siblings, 1 reply; 15+ messages in thread
From: Pablo Rodriguez @ 2018-08-09 18:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have the following sample

    \starttext
    \startTEXpage[offset=1em]
    Pages: \ctxlua{context([[\lastpage]])}.

    Next page: \ctxlua{context([[\lastpage]] + 1)}.

    (Lua \luaversion)
    \stopTEXpage
    \stoptext

With Lua-5.2 (ConTeXt with JIT), I get the expected results. But with
Lua-5.3 (standard ConTeXt), I get 2.0 as the value for the next page.

I’m afraid that there is a bug here. I was told that the integer type
has been introduced in Lua-5.3.

I had experienced the same issue with the handlecsv module. In my very
limited understanding of the issue, integers are displayed as .0 floats.
I wonder which would be the way to fix it.

Is this a real bug or am I missing something?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-08-12 14:44 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-09 18:02 integer displayed as .0 float in Lua-5.3 Pablo Rodriguez
2018-08-09 18:12 ` Wolfgang Schuster
2018-08-09 19:20   ` Pablo Rodriguez
2018-08-09 19:34     ` Alan Braslau
2018-08-09 20:00       ` Pablo Rodriguez
2018-08-09 20:16         ` Alan Braslau
2018-08-11  9:29           ` Pablo Rodriguez
2018-08-11 17:55             ` Alan Braslau
2018-08-12 14:44             ` Arthur Reutenauer
2018-08-09 20:25         ` Hans Hagen
2018-08-11 10:05           ` Pablo Rodriguez
2018-08-09 20:20     ` Hans Åberg
2018-08-11  9:33       ` Pablo Rodriguez
2018-08-11 12:21         ` Hans Åberg
2018-08-12  7:49         ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).