Item Pointer

Clone

Description

Returns a new item pointer, which is a clone of this pointer. It is most commonly used when working with tables.

Syntax

ItemPtr = ptr:Clone()

Parameters

none

Return Value

ItemPtr
New Item Pointer

Remarks

Clone is required as setting a variable equal to pointer, means when the first pointer is changed the second will also change.

Example

ptr  = fhNewItemPtr()
ptr:MoveToFirstRecord('INDI')
ptr2 = ptr:Clone()
ptr2:MoveNext()
        

The code above will result with ptr pointing to the first person in the data and ptr2 pointing to the second person.