| Bill Allombert on Sun, 08 Sep 2024 16:29:54 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: Wrong error message from 2u |
On Mon, Aug 12, 2024 at 11:54:17AM +0200, Vincent Lefevre wrote: > On 2024-08-11 23:48:38 -0700, 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. > > The issue seems to be the "expecting ','" (and the position of > the arrow is a consequence). Why "expecting ','"? > > Simpler testcase: > > ? [2u,3] > *** syntax error, unexpected variable name, expecting ',': [2u,3] > *** ^- I fixed it in master: ? [2u,3] *** syntax error, unexpected variable name, expecting ',': [2u,3] *** ^---- ? my([a,b,c]=[(u-v)^2,2u*v,(u+v)^2]); c^2-a^2-b^2 *** syntax error, unexpected variable name, expecting ',': my([a,b,c]=[(u-v)^2,2u*v,(u+v)^2]);c^2-a^2-b^2 *** ^------------------------- Thanks for reporting this! Cheers, Bill.