Bill Allombert on Thu, 11 Oct 2007 21:37:40 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Suggestion |
On Thu, Oct 11, 2007 at 05:24:43PM +0200, Martin Larsen wrote: > > Hi > > I have a suggestion for a new feature, but first I will mention a few problems with GP/PARI CALCULATOR Version 2.4.1 (alpha) on Windows. > > * a script loaded at startup will not have it's local()'s recognized (they become global) Could you give an example ? local() are only supported inside functions in GP 2.4.1. > * a script with syntax error loaded with \r will prevent any new attempt of loading it. > > * flag==4 in vecsort produces an error A GP 2.4.1 specific bug which was a pretty buggy development release, alas! Try out GP 2.3.2 which is much more solid. > And now a little funny example: > > > k=1;vector(6,i,[k,k=k*10%7][1]) > %1 = [32, 3, 32, 6, 32, 5] This is a well-know bug with the memory handling: GP forget to copy the first k in the vector. This is fixed in the forthcoming GP 2.4.2 I recorded it as bug #686. > > k=1;vector(6,i,[k*1,k=k*10%7][1]) > %2 = [1, 3, 2, 6, 4, 5] > > I think this is a nice way if you don't want the result from the last expression(?) > Only 2. example works as expected, but is the method safe? Actually yes, but you could just do k=1;vector(6,i,l=k;k=k*10%7;l) which is safe. > Now 2 suggestions: > > > vector(6,i,1) > %3 = [1, 1, 1, 1, 1, 1] > > I think it would be nice to be allowed to exclude unused locals in vector and matrix. This would clash with the current interface design: there is no polymorphism. > And last - Wouldn't it be nice if we had a standard-script that > followed Pari with lots of extra functions, where functions could be > loaded as last resort on demand? What we need is standardised way to write and publish library of GP functions. Would you like to try ? Cheers, Bill.