From: juh+ntg-context--- via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: juh+ntg-context@mailbox.org
Subject: [NTG-context] Re: max function in spreadsheettable
Date: Tue, 15 Oct 2024 21:37:32 +0200 [thread overview]
Message-ID: <12b6792e-6bc5-4ebe-8c99-73e75f613f2c@mailbox.org> (raw)
In-Reply-To: <c6fde8d6-5ef3-49f8-b3bf-7afefc674cab@freedom.nl>
Am 15.10.24 um 17:16 schrieb Hans Hagen via ntg-context:
>>
>> local sum = string.format("%0.2f", (0.3 * 100))
>>
>> Gives 30.00
>>
>> how do I get 30,00
>
> local sum = string.formatters["%0.2M"](0.3 * 100)
Thanks a lot, Hans.
I can't find "string.formatters" and the format string %0.2M online or
in the Lua-Manual. Any hint where I can find more about this? As commas
as decimal separator might be a common wish, I would like to document it
somewhere in the Wiki, if I could find some context.
Ciao!
juh
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2024-10-15 19:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 8:59 [NTG-context] " juh+ntg-context--- via ntg-context
2024-10-15 10:42 ` [NTG-context] " Henning Hraban Ramm
2024-10-15 12:33 ` juh+ntg-context--- via ntg-context
2024-10-15 15:16 ` Hans Hagen via ntg-context
2024-10-15 19:37 ` juh+ntg-context--- via ntg-context [this message]
2024-10-15 19:58 ` Wolfgang Schuster
2024-10-16 5:43 ` juh+ntg-context--- via ntg-context
2024-10-15 20:04 ` Henning Hraban Ramm
2024-11-14 7:59 ` [NTG-context] string.formatters (was: Re: max function in spreadsheettable) juh+ntg-context--- via ntg-context
2024-11-14 8:18 ` [NTG-context] Re: string.formatters juh+ntg-context--- via ntg-context
2024-11-14 18:23 ` Wolfgang Schuster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12b6792e-6bc5-4ebe-8c99-73e75f613f2c@mailbox.org \
--to=ntg-context@ntg.nl \
--cc=juh+ntg-context@mailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).