DICTGETNEXTASSOC

Top  Previous  Next

Syntax

POINTER = DictGetNextAssoc(dict as POINTER,rNextPosition as UINT BYREF)

Description

Returns the absolute value of a number.

Parameters

dict - Pointer to an associative array created with the DICTCREATE command.

rNextPosition - Specifies a reference to a POSITION value returned by a previous GetNextAssoc or GetStartPosition command

Return value

A pointer to an association.

Remarks

Retrieves the array element at rNextPosition, then updates rNextPosition to refer to the next element in the array. This function is most useful for iterating through all the elements in the map. Note that the position sequence is not necessarily the same as the key value sequence.

Example usage

PRINT:PRINT "Iterating":PRINT "---------"
pos = DictGetStartAssoc(myDict)
WHILE pos
    pAssoc = DictGetNextAssoc(myDict,pos)
    PRINT DictGetKey(pAssoc)," ",DictGetValue(pAssoc)
ENDWHILE