[Kst] Indexed access into vectors ?

George Staikos staikos at kde.org
Mon Jun 27 19:34:48 CEST 2005


On Monday 27 June 2005 12:55, Brisset, Nicolas wrote:
> I was wondering whether it is already possible in expressions (as used
> in equations) to access the nth element of a given data vector ?

  The plan is to support this at some point, but I have no idea what notation 
to use.  [vector[n]] seems ugly but should be parseable.  [vector(n)] 
interferes with function calls.  [vector{n}] is unusual.  [vector][n] is 
impossible to distinguish from a possibly common parse error ( != [v1]*[v2]).

  I guess we also return NAN if the index is non-integer or out-of-range?

-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/


More information about the Kst mailing list