The next repeat instruction is used to stop the current pass of a repeat loop and start the next one immediately.
Table 20.19. next repeat syntax
| Production | Syntax | Links |
|---|---|---|
next_repeat_instruction |
"next" "repeat" identifier ?
remarks:
| the section called “next repeat instruction” |
Example 20.22. next repeat example
The following code first creates some table data and then displays all row numbers containing at least one column whose value is void :
service instruction_examples
command next_repeat_example_1
script
// create table data provider with 2 rows and 4 columns, and containing some simple test data
const positive32 row_count = 2
const positive32 column_count = 4
const table_data_provider table_data_provider = fa_table_data_provider_for_tests.co_create ( &
i_row_count = c_row_count &
i_column_count = c_column_count )
// display all row numbers containing at least one void column
repeat from row_index = 1 to c_row_count id: row_loop // loop through all rows
repeat from column_index = 1 to c_column_count // loop through all columns
const any_type cell_value = c_table_data_provider.co_cell_value ( &
i_row_index = c_row_index &
i_column_index = c_column_index )
if c_cell_value =r void then
se_system.console.write_line ( "Row " & c_row_index.co_to_string & " contains at least one void column" )
next repeat row_loop
end if
end repeat
end repeat
end script
end command
end service