lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 20/06/2023 16:12, Thijs Schreijer wrote:

On 20 Jun 2023, at 14:39, Marcus Mason <> wrote:

how can I format the number in the code such that does not loose any precision in it’s
journey from; number => string => lua-parser => number ?

I believe the %q specifier was designed for this purpose

%q expects a string. Hence it will format the number in quotes, turning it into a string.


I found another relevant article:

and also this SO post:

which links to the article above and other info.