@NEXT

Top  Previous  Next

Syntax:

 

@NEXT( <list> )

 

Description:

 

This function returns the contents of the next item in the string list <list>, that the pointer currently points to, and then advances the pointer by 1. The pointer may be set using the LIST SEEK command. For LIST and COMBO elements, if no item is selected the index value is -1 and the value returned by @NEXT() will be null.

The parameter <list> must be either a list number or the name of the list dialog element to which the command will apply.

You use the @NEXT function if you want to read sequentially through the items in a list.

 

OK:

 

Set to false when the end of the list is reached.

 

Example:

 

LIST CREATE, 1

LIST LOADFILE, 1, NAMES.TXT

REPEAT

  INFO @NEXT(1)

UNTIL @NOT(@OK())

LIST CLOSE, 1

 

See also: