Martin Larsen on Thu, 11 Oct 2007 19:42:19 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



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)
* a script with syntax error loaded with \r will prevent any new attempt of loading it.

* flag==4 in vecsort produces an error

And now a little funny example:

> k=1;vector(6,i,[k,k=k*10%7][1])
%1 = [32, 3, 32, 6, 32, 5]
> 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?

> vecsort(%2,,4)
  *** vecsort: invalid flag in vecsort. :-(

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.

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?


Du kan være med til at redde isbjørnene - Live Earth viser vejen