lr.next_row

Advances to the next row in the parameter data file.

int lr.next_row( String dat_file ); 
String and Parameter FunctionsJava Syntax

Arguments

NameComments
dat_fileThe name of the parameter .dat file containing the values you want to retrieve.
 

The lr_next_row function sets the active row to be the next row in the specified parameters file. If the current row is the last, lr_next_row sets the active row to the first row.

Use this function within an iteration, to advance to the next set of values. If you want the active row to advance at the beginning of each iteration, you do not need this function: In the parameter properties, you can specify to advance to the next row for each iteration.

This function is most useful with Table parameters. If you specify more than one parameter in a file, lr_next_row advances the values for all the parameters. This is the natural way to advance Table rows.

To advance only one parameter in a file, use lr.advance_param with Select next row set to sequential in the parameter properties.

Note that the dat file name is by default the name of a parameter, unless you specified a different name for the file when you defined the parameter. For example, the dat file for the IDs parameter, is IDs.dat.

Return Values

Returns 0 on success and -1 on failure.

Parameterization

You cannot use standard parameterization for any arguments in this function.

Example

In the following example, ID is a parameter defined in the Parameter list. The lr.next_row function advances to the next row in the ID.dat file.

lr.message( "Connect to Stock Trader ID Number " + lr.eval_int("<ID>") );
... 
lr.next_row("ID.dat");
lr.message( "Connect to Stock Trader ID Number " + lr.eval_int("<ID>") );
The ID.dat file has the following values:
    2347
    2348
    2349
    2350
Example: Output:
Connect to Stock Trader ID Number 2347
Connect to Stock Trader ID Number 2348