|
FRM v1.4.2 |
||||||||
PREV SCRIPT NEXT SCRIPT | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | FUNCT | DETAIL: FIELD | CONSTR | FUNCT |
CompiledModule | +--emos_ddt_access_range_lib
This library defines an "iterator" (as much as one can emulate a real iterator in a language such as TSL) for data tables (ddt-interface). The main benefits of this iterator are: 1.) you can loop through any table in an uniform way, 2.) you can choose one of four algorithms to iterate through the range: * sequntial (forward) * sequential (reverse) * random (values may get repeated) * random (values will not be repeated) 3.) you can simultaneously have iterators for multiple data tables (ane at a time per table!) 4.) you can use it to iterate any range of numbers (unrelated to data tables).
NOTE!
from
and to
parameters. It would
be great if someone could find time to implement this.
Function Summary | |
String |
DDT_ACCESS_clean_range(in table)
Removes range-access for given table and frees the internal buffers. |
String |
DDT_ACCESS_get_next_in_range(in table)
Returns the index of the next test to be processed. |
String |
DDT_ACCESS_has_more_in_range(in table)
Indicates whether there subsequent call to DDT_get_next_in_range() is about to succeed. |
String |
DDT_ACCESS_init_range(in table,
in from,
in to,
in mode)
Initialises the range-access algorithm. |
protected String |
delete_dimension(inout[] arr,
in dim)
This function will delete a dimension from a multidimensional array. |
protected String |
delete_index_array(in table)
|
protected String |
get_norepeat_random_pos(in table)
|
protected String |
get_random_pos(in table)
|
protected String |
init_index_array(in table)
|
protected String |
set_pos_used(in table,
in pos)
|
Function Detail |
public String DDT_ACCESS_init_range(in table, in from, in to, in mode)
table
- (in) the name od the iterator (data table)from
- (in) begining of rangeto
- (in) end of rangemode
- (in) one of four possible access modes
[default: DDT_ACCESS_SEQUENTIAL]
public String DDT_ACCESS_clean_range(in table)
table
- (in) the name od the iterator (data table)public String DDT_ACCESS_has_more_in_range(in table)
table
- (in) the name od the iterator (data table)
public String DDT_ACCESS_get_next_in_range(in table)
table
- (in) the name od the iterator (data table)
protected String delete_index_array(in table)
protected String init_index_array(in table)
protected String set_pos_used(in table, in pos)
protected String get_random_pos(in table)
protected String get_norepeat_random_pos(in table)
protected String delete_dimension(inout[] arr, in dim)
WARNING! It will delete ALL dimensions with the same name. For example assume your three-dimensional array "arr" has the following content:
arr["x",1,"x"] = "x1x"; arr["x",1,"y"] = "x1y"; arr["y",1,"x"] = "y1x"; arr["y",1,"y"] = "y1Y";then the following command
delete_dimension( arr, "x" );will delete everything BUT
arr["y",1,"y"] = "y1Y";
arr
- (inout) array to be processeddim
- (in) dimension(s) to be removed
|
FRM v1.4.2 |
||||||||
PREV SCRIPT NEXT SCRIPT | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | FUNCT | DETAIL: FIELD | CONSTR | FUNCT |