|
Purpose |
Cycle through parent's child records. This function is regarded as obsolete in 4.500 and from 4.620 is no longer included in the DP4 C library (the source is on the DP4 CD Rom if you require it for maintaining old programs. | ||
|
Syntax |
int cycle(child_rec, par_rec, role) | ||
|
Parameters |
short* child_rec |
Pointer to child's L field | |
|
|
short* par_rec |
Pointer to parent's L field | |
|
|
char* role |
Role of parent - child index | |
|
Description |
The cycle() function can be used to cycle through the children of a record. This is an old function and explicit use of the rec_fetch() function is the preferred method. This function is implemented using the functions copy2child() and ftch2nd(). It uses the global variables firstitem and itemsdone to control its action. To use this function, set up the key fields in the parent record and set firstitem to TRUE. Cycle will return FALSE when there are no more records to fetch (itemsdone is then set to TRUE.) | ||
|
Return values |
Returns TRUE if a child record has been found, otherwise FALSE | ||
|
See also |
|||
|
Example |
| ||