Ruud H.G. van Tol on Mon, 12 Aug 2024 12:04:45 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Wrong error message from 2u
|
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: Re: Wrong error message from 2u
- From: "Ruud H.G. van Tol" <rvtol@isolution.nl>
- Date: Mon, 12 Aug 2024 12:04:36 +0200
- Delivery-date: Mon, 12 Aug 2024 12:04:45 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=isolution.nl; s=soverin; t=1723457078; bh=aKn9lVSX3MRJosn0JB2QoC0cBo7gdNm3s+HR78uzj8Q=; h=Date:Subject:To:References:From:In-Reply-To:From; b=HXfQvHSh4jamHNnny/GyZVHRlvT/bUYHdlH5BL1YkqkT9XrgMpb1ZGG6EW/8gr6+E zFyPw5KIeUaf4DVLwNCXDv2ByU8VCQZnQKiMejwlA2nRjUgSbwZFGVmofFxx5xSyLT 7pHTMhvjQBa09q5pr6ya4wpKL80NduYIc6mReDDb1rGRdIDrmBX7Eo/03gkBT4Adyg NgearzerzU7KMvJcAHGNPflhaSGc3X5yalgc0rPqweVX5PjYz34Tynu5TQmJrRYwbv KNE+Iw0rqt1/QNLN+ooy9utxNK2OuN/jiLukA2p01Pe9Hkor4ErbJrddj5JGM5eX1R 1uKbRqRbmrg4g==
- In-reply-to: <ZrmwRjKBBrZFqTOx@debian.attlocal.net>
- References: <ZrmwRjKBBrZFqTOx@debian.attlocal.net>
On 2024-08-12 08:48, Ilya Zakharevich wrote:
In
(23:29) gp > my([a,b,c]=[(u-v)^2,2u*v,(u+v)^2]); c^2-a^2-b^2
*** syntax error, unexpected variable name, expecting ',': ...,c]=[(u-v)^2,2u*v,(u+v)^2]);c^2-a^2-b^2
*** ^--------------
the arrow points at the second closing bracket. The actual problem is
2u.
Another example:
? [2u, 1, 2, 3]
*** syntax error, unexpected variable name, expecting ',': [2u,1,2,3]
*** ^-
P.S. IMO, 2u should better be parsed (as expected by the user!).
Rather not. For example, 2e1 is already syntax, so can't also mean 2*e1.
-- Ruud