ITEM

Synopsis
ITEM index thing
Description

If thing is a word, ITEM outputs the index-th character of the word.

If thing is a list, ITEM outputs the index-th member of the list.

If thing is an array whose origin is 1 (which is most arrays), ITEM outputs the index-th element. If thing is an array whose origin is not 1, then ITEM outputs the element that is at index - origin + 1.

An index starts at 1 for words and lists; the starting index of an array is specified when the array is created.

Example
SHOW ITEM 2 [a b c]
b
SHOW ITEM 3 "abc
c
SHOW ITEM 1 {a b c}
a
SHOW ITEM 1 {a b c}@0
b

SourceForge.net Logo