@ITEM

Top  Previous  Next

Syntax:

 

@ITEM( <list>{,<item number> {,<column number>} } )

 

Description:

 

This function returns the contents of the string at the current index position in the string list <list>. The index can be set using the LIST SEEK command.

The optional second parameter of @ITEM (i, x) allows you to retrieve an item from a list randomly without having to seek to that item first. The index value afterwards has changed just as if a LIST SEEK command had been carried out.

The optional <column number> may be used only when <list> is a TABLE element, to access the data held in a specific column or cell of that item.

The parameter <list> must be either a list number or the name of a list dialog element to which the command will apply. An error will occur if the list does not already exist.

OK:

Set to false if item <number> is out of range..

 

Example:

 

LIST CREATE, 1

LIST LOADFILE, 1,NAMES.TXT

LIST SEEK,1,9

%I = @ITEM(1)

INFO The tenth name is %I

LIST CLOSE, 1

 

See also: