b = swap(GroupName, RecordNumber1, RecordNumber2);
The
swap function reorders the sequence of occurrences of records or items. It is useful for reorganizing the position (i.e., occurrence number) of items in a roster— for instance, if you want to ensure that the head of household is the first person in the roster.
The swap function is primarily intended for use in batch applications. It should be used with extreme caution in data entry applications because of possible conflicts between the operator's actions and the program logic.
The function returns a logical value 1 (
true) if successful and 0 (
false) otherwise.
swap(PERSON, 1, ptrHead);