From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from cgl.ntg.nl (Cgl.ntg.nl [5.39.185.202]) by inbox.vuxu.org (Postfix) with ESMTP id 9DECC2B19A for ; Tue, 15 Oct 2024 21:43:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 929D2480F4B for ; Tue, 15 Oct 2024 21:39:09 +0200 (CEST) Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=ntg.nl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntg.nl; h= content-transfer-encoding:content-type:content-type:from:from :list-unsubscribe:list-subscribe:list-post:list-owner:list-help :list-archive:archived-at:list-id:subject:subject:reply-to :precedence:in-reply-to:content-language:references:mime-version :date:date:message-id:received:received:received:received :received:received; s=cgl; t=1729021149; x=1731613150; bh=NYeL+8 MBXE7ioENANsPJN2VqIhg7W1pcNV7JVMXkwTs=; b=ZUhD42tXQgYxeNvepBt6U9 omtzbsg4gUcjelRXov/CL1HPxq32hW+Ug/R5YN28+N1Jrrqg1lLyVur3/WzmnLps gmATrE0AEIyzqkHR4k0NRtJ+vkscXjeU+76VMub1gLRDUhpB0hByNiUMYSWtXg5Q pZL2Ag+C57HWSMMJRt9iQ= X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=mailbox.org Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s4Mj0GomdSby for ; Tue, 15 Oct 2024 21:39:09 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id D811D485E39 for ; Tue, 15 Oct 2024 21:38:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id DAF9C485C7B for ; Tue, 15 Oct 2024 21:37:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2GA8_yxeuS2W for ; Tue, 15 Oct 2024 21:37:35 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=80.241.56.152; helo=mout-p-102.mailbox.org; envelope-from=juh+ntg-context@mailbox.org; receiver= Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id 88A18485C78 for ; Tue, 15 Oct 2024 21:37:35 +0200 (CEST) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4XSkrs0vRLz9sln for ; Tue, 15 Oct 2024 21:37:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1729021053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4Ra/sf82M92WY6Wa5N2FybxdBbisPDKvw14L2rZu3W0=; b=TNVaRKsgbyS6487/7BqdE9iPsPdk5ZrQx5poatXz+8K4Tv884dtzEDrjS9jRZJMkohjqSf amp32b9kQdsCZyCT4pYTGbPhm7FhUkycdmLmhFxZJQCW6nN5nBZevavEpe9+Dmg472hha5 wp23Lsjdhwgcma8xOPDaPsXRllbXoBXOWD1Gbdd3A6giEsa5bXHwk8MeaOa7g3nP/WVsD4 o4DtcO+JI+BdWN29jH/yZ0TcQPi7z0MxHOHPXLMFjS/NPdkuu2xUF3lfLlInKZ0qofgYWp inQpk2RlQKbD3rgWKZNfywfssn8dToqcaviUNrYTcVx2cPTNqG4bf2PVZ90UxA== Message-ID: <12b6792e-6bc5-4ebe-8c99-73e75f613f2c@mailbox.org> Date: Tue, 15 Oct 2024 21:37:32 +0200 MIME-Version: 1.0 To: ntg-context@ntg.nl References: <8291d068-6311-422d-a6d2-eaadba2a2a9a@mailbox.org> <120fd637-7671-4252-921c-9dc08c328d77@fiee.net> <0a76a466-ba65-43a9-806f-eac63f6a882f@mailbox.org> Content-Language: de-DE In-Reply-To: X-MBO-RS-ID: 23140dfe67b12d85810 X-MBO-RS-META: tcxrhqd9wkmtogx778ywnwsqkdsf3gkn Message-ID-Hash: ALSJUI7P5OEJ3TLGK3H67LJNZE2LGV2A X-Message-ID-Hash: ALSJUI7P5OEJ3TLGK3H67LJNZE2LGV2A X-MailFrom: juh+ntg-context@mailbox.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: max function in spreadsheettable List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: juh+ntg-context--- via ntg-context Cc: juh+ntg-context@mailbox.org Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit 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 ___________________________________________________________________________________