Search                        Top                                  Index
HELP DATALIST                            Revised: John Williams Apr 1985
                                        Revised: Adrian Howard, Mar 1992

    datalist(ITEM) -> LIST

This procedure returns a list of the components of the object it is
given as argument. It is defined as:

    define datalist(object);
        [% explode(object) %]
    enddefine;

Here are some examples of DATALIST applied to various kinds of data:

    LIST:               datalist([a b c]) =>
                        ** [a b c]

    VECTOR:             datalist({a b c}) =>
                        ** [a b c]

    STRING:             datalist('abc') =>
                        ** [97 98 99]

    REFERENCE:          datalist(consref("a")) =>
                        ** [a]

    CLOSURE:            datalist(conspair(%"a","b"%)) =>
                        ** [a b]

    ARRAY:              datalist(newarray([1 3 1 3], nonop *)) =>
                        ** [1 2 3 2 4 6 3 6 9]

    PROPERTY:           datalist(
                            newproperty([[a A][b B]], 5, false, true)
                        ) =>
                        ** [[b B] [a A]]

The procedure cannot be applied to a number, procedure, -true-, -false-,
-nil-, or -termin-.

Also see:

    HELP *CLASSES   --- Information on other procedures for accessing
                        structures
    HELP *APPDATA   --- Applies a procedure to each element of a data
                        structure

    REF *EXPLODE    --- Put all the elements of a structure on the stack


--- C.all/help/datalist
--- Copyright University of Sussex 1992. All rights reserved. ----------