slang-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] SLANGFUN and arrays .....


Paul Boekholt <p.boekholt@xxxxxxxxx> wrote:
>Or use a list.  From the manual:

  Right.  One advantage of the list over the array is that an element
may be easily inserted/appended at any position using the list_insert
and list_append functions.  Elements may be removed using the
list_delete and list_pop functions.  

  At the moment, lists do not support support "slices", i.e., one cannot
use

   even_elements = list[[0::2]];
   odd_elements = list[[1::2]];

to create lists from the even and odd elements of the list.  If you
need such a feature, then an array may be more appropriate.
Eventually, lists will support the slicing operation.

--John

_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]