# Command: ReadList

NEST HelpDesk | Command Index | NEST Quick Reference

Name:

    ReadList - read a list of specified format from a stream

Synopsis:

    istream [types] ReadList -> [result]

Examples:

    istream [/Number /Number] ReadList -> [[1 2] [3 4] ...]
      istream [/Number] ReadList -> [1 2 3 4 ...]

Description:

    ReadList reads the rest of a file into an array. If [types] contains
      more than one type specifier, the array is constructed from subarray with
      elements of the types, specified by  [types].

      ReadList tries to allocate the result array in advance. The option
      BufferSize can be specified to optimize this behaviour.

      The valid type specifiers are defined in the ReadModes dictionary.

Parameters:

    istream : an input stream
      [types] : an array with one or more of the following type specifiers:
      Number	- specifies a real number
      Double	- specifies a real number
      Integer- specifies an integer
      Word  	- a white space separated string
      String	- a text line terminated with a newline character

References:

    ReadList approximates the Mathematica function.

Author:

    Marc-Oliver Gewaltig

FirstVersion:

    Jun 17 2000

SeeAlso:

- Read
- ReadModes
- Export

Source:

    /opt/conda/conda-bld/nest_1512418773968/work/nest-2.14.0/lib/sli/FormattedIO.sli

NEST HelpDesk | Command Index | NEST Quick Reference

© 2004 The NEST Initiative