| Bill Allombert on Wed, 29 Apr 2026 21:23:48 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: variable vector assignments in loop |
On Sun, Oct 12, 2025 at 12:57:38PM -0400, Max Alekseyev wrote: > Hello, > > PARI/GP well supports assignments like > [a,b] = [1,2]; > > However, this does not work in loops like > > ? foreach(factor(100)~, [p,k], print([p,k]) ) > *** variable name expected: foreach(factor(100)~,[p,k],print([p,k])) > *** ^------------------- > > Currently we can only get vectors as whole, but not unpack them: I have finally implemented that feature in the master branch, see post to pari-dev. Note that this is experimental. This is unfortunately not supported by GP2C. Cheers, Bill