Bill Allombert on Tue, 05 Sep 2023 18:27:18 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Questions on PARI/GP formatting
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: Questions on PARI/GP formatting
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Tue, 5 Sep 2023 18:22:20 +0200
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1693930934; c=relaxed/relaxed; bh=CqIcT6pdtZpnTWnZxSeTl2gqSXRER/d4gD3t8hvfwUE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=gtpiPDDQgf6ebp2PhrLB+UN6rxMZlL/UrWAmxqPaHZSg+6vKEg/hC9Cb99lAYwOXMw8i1SBAe8COtRcOIScqoYS7P79AzkR4Dfl2sHjztwaW/faqAYeov6wrUyzJsbeLZWjlIYwuH6UJjR/+GUByHSnJypl0ydosAsCscYskM8g5JMFgLugAHygP37p2XfixgFi1zb61WAHt/WUgQ92lhcvn1PSbGirpgrwFoKPzSGOayZTXrdZAncGo0Al5gIJrwn7viRDc+bYL3NAbXiU6LoCnqxynvEjvx/oLfq5IoTcZCnsJF97Kb7QZLhwFCcR4SKCtl26bzTlpbu7Czs7fjBKfFBl6rNej5nv8otSHtJuj88hubBcH+gUlhGzyVuBD9aBfY6YzgNCIw7P6yq50BWdVXZt9LMb0cDVtWfPFymbaM4hTP0h9fx0/eVOMa2qpM+JLiTNiacSV9BraxEH+QNf8YXn3t/L3gTNZDuFJoodtH/Tg198N4+9tNMnENcBBssJEr+JI5KMFdI3NgAJOHV/Eau6F61rz5P9LrqGzKSCqGBqd1/ozLvNj+f3Fg1vI9f3PjvJLoYZKwE2zFS53gnXdomj5Vwq2LitjA2sGgqhIZ+F5XwSlf7fmJpKvmk633pdRMO9eE5Fzr36q6XQLkID7+Q3DVzb5KHFb6Gnp0uc=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1693930934; cv=none; b=aPTAlW3Rlz7GvGmzM5Mspq70o84gKu2wy3IOLQ1pgfpYA1gypkI+TxDKF9skrqtK5UFIFpze61LYP77gqVVa46y0PNer8ZLQJLJ13tmvfA94LA7j4nZIi0r8sM5VyTvYicJP54ImbhwlM4rcgQZKEJiPn10H1Npia0jwhsoZL2Y0SPMIG8K0yj1qz4dh23+9sNhoZUf23eg/iKLgdDbisczaLECA6wzVgQlxhg2BW4Yx+AjO4KGsIfOj+ezW8c+Eas1K+cci+tl79eGcemWaePVlBuZ/04d/YCpybO4c9OZFTESwP7VIiXyeOnQv06fx00DZHVkwQbvcgW6nhOkJSEJhwv+tShX3jbeU2ipGvO2YKDTWUjuAdjkOJ7TiiDCXvOLEvKuxjxTBouyDUEmalLWG8cX6/JdJ0VNSI3zjEsI5tB8N+BXaABHl2nMwYJjHB91JQYCYudThFFf2Wbqh7yBU8vn2P7wR4AsKpNpr4cTCOwxS6ntJfZHILXaE5sYNKUM3Bn8Nt8cTEhGDku/CqMBYb7Ps3iSNdygXkmkVSiz5VZsfU27yS3Dtnk358/7I7pKvs/uZFOp3KWH3Iiei391dHLcARFmJWsp8Oe7u3ROmNWwP8d3npEuzzQsyBO6PzhgWhMWy/tqsevBo1n/o7QDa4qR2sH83Rnwfro1lkOY=
- Authentication-results: smail; dmarc=none header.from=math.u-bordeaux.fr
- Authentication-results: smail; arc=none
- Delivery-date: Tue, 05 Sep 2023 18:27:18 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1693930934; bh=CqIcT6pdtZpnTWnZxSeTl2gqSXRER/d4gD3t8hvfwUE=; h=Date:From:To:Subject:References:In-Reply-To:From; b=LpB1VjBm3VyRr+8UF6dkt0m+wlGkn+qJOcoHbB0Zh/BGez/ObII40R2v+adt+yVz8 KUbleuXb02gGktOkkg0dy8ZuzoBefkMwDugTJf4h2G5MRy4EUKGOKajtdfpPssPehD lg7BzHxsxxC7aY1989hsA5EGSNxEeGdb4Dq5K4mBG/XKaDdsvFcufpLociROGbEHhl 853g9xBmUJQ0PL6RMxWP9/Je3YqaMTnvM0eIVgGcPKjfMMZhb8LBFn+XpCzeCF47pB 68WYeqMUS/7xRIktAy5EaK6IJU60YzMmEyMpQs6KfaKrXmfHO/xhHAVQJ5LChkmm6R Ggf7gogV14sr6szG7S6DdfHSdwVGNBB8H/ExxDOb4Kpcj1Ugf3suoLmsIjPh9ABswA +KA3ZPFiuf8qMAUl1/3JtzO/G6vylq8nVNnxhvXKiqof0tSSvnrvbN24DzFmwf20jP dpvvq6vg3jVpw1OjBBXrZx4Cf70UNaKnO2fA/+nu709TDL+JJcql7Ns5/kMgeeqKQx ngQQNb0+MXf1Tq6BeH+6IO3m0o2n3yGGQWyajhofOJEJJQU6lXs2F+OnTwbwRaR4N/ ZrHXvjPCWbr9kDU9mhOLVKd3UWIolLESIwvHdMtkstjB98o0uP5Bddz5S4sCW6NkB/ 4IjaR2Vhpm76u7hrj5+xxqYc=
- In-reply-to: <3357699e64c1e16204299ca9cd4da775@stamm-wilbrandt.de>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <3357699e64c1e16204299ca9cd4da775@stamm-wilbrandt.de>
On Tue, Sep 05, 2023 at 06:00:42PM +0200, hermann@stamm-wilbrandt.de wrote:
> There seems to be no PARI/GP formatter tool:
> https://pari.math.u-bordeaux.fr/archives/pari-dev-2308/msg00029.html
>
> I added "\" suffix for multiline functions.
> Is there a simpler way?
Yes, use brace for multiline functions. No need for \
We offer this tutorial:
<https://pari.math.u-bordeaux.fr/Events/PARI2019b/talks/prog.pdf>
> I added whitespace where it helped me, but overall it is not consistent.
> Are there best practices wrt GP optional whitespace use?
>
> I use "break", should it be "break()" instead?
Yes, because break has an optional argument.
For historical reason functions without mandatory arguments can be called without ().
This allow to write I^2 instead of I()^2, Pi^2/6 instead of Pi()^2/6, etc.
Cheers,
Bill