array_to_list

Gamma: Version 4.0
Prev |  | Next

# `array_to_list`

`array_to_list` -- converts an array to a list.

## Syntax

    array_to_list (array);

## Arguments

`array`

  Any array.

## Returns

The array converted to a list.

## Description

This convenience function converts the top level of an array to a list. Lower level arrays in the resulting list will remain unchanged unless converted separately.

## Example

        Gamma> a = array(1,2,3);
        [1 2 3]
        Gamma> b = array(4,5,6);
        [4 5 6]
        Gamma> c = array(7,8,9);
        [7 8 9]
        Gamma> d = array(a,b,c);
        [[1 2 3] [4 5 6] [7 8 9]]
        Gamma> e = array_to_list(d);
        ([1 2 3] [4 5 6] [7 8 9])
        Gamma> list_p(e);
        t
        Gamma> list_p(a);
        nil
        Gamma>

See the Photon: Setting Up Plots section of the History Functions chapter in the Cogent Tools Demo book for an example of this function used in context.

## See Also

`list_to_array`

Prev | Home | Next
`array` | Up | `aset`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.