jed-users mailing list

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

Re: list to array conversion?


On 12.04.06, Marko Mahnic wrote:
> G. Milde wrote:
> >Dear Jed users,
> >
> >I am looking for the right way to convert a list to an array (and vice
> >versa, once we are at it).
> >
> >What i would like to do is using the where() function to test a list for a
> >value without the need to loop over it.
 
> This will fail in general since you can have mixed types in a list.

Not necessarily, as there is the Any_Type[N] array available.

A list2array function could also take an optional type argument

 Array_Type = list2array([DataType_Type type], List_Type list);

The default could be either Any_Type, or auto-detection. See pop2array() in
http://jedmodes.sf.net/mode/datutils/ for an example of auto-detection of
the data type.

Günter

-- 
Milde ife.et.tu-dresden.de

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


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