REBOL Document

Pick - Function Summary


Returns the value at the specified position in a series.


pick series index


series - The series argument. (must be: series pair event money date time object port tuple any-function)

index - The index argument. (must be: number logic pair)


The value is picked relative to the current position in the series (not necessarily the head of the series). The VALUE argument may be INTEGER or LOGIC. A positive integer positions forward, a negative positions backward. If the INTEGER is out of range, NONE is returned. If the value is LOGIC, then TRUE refers to the first position and FALSE to the second (same order as EITHER). An attempt to pick a value beyond the limits of the series will return NONE.

    str: "REBOL"

    print pick str 2

    print pick 3

    print pick ["this" "that"] now/time > 12:00


fifth - Returns the fifth value of a series.
find - Finds a value in a series and returns the series at the start of it.
first - Returns the first value of a series.
fourth - Returns the fourth value of a series.
second - Returns the second value of a series.
select - Finds a value in the series and returns the value or series after it.
third - Returns the third value of a series.

<Back | Index | Next>

Copyright 2004 REBOL Technologies