Use Case of udiFirstListIndex: Navigating from the First to the Last Element in the List

Overview

This example illustrates how to navigate from the first to the last element in the list:

Illustration

Code Example

G-SE-0078542.1.png

 

 

//start from the first element of the list
udiIndex := ifTargetsHandler.udiFirstListIndex;

WHILE udiIndex <> Gc_udiTailListIndex DO
    //get the data on the target at the current index
    stTempTarget := ifTargetsHandler.GetTarget(udiIndex);

    
//do something

    
//get the NEXT index
    udiIndex := ifTargetsHandler.GetNextListIndex(udiIndex);
END_WHILE