The following example opens the customer
table in the testdata
database. FOR ... ENDFOR is used to create a loop in which the name of each structural index is displayed.
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'data\testdata')
USE customer && Open customer table
CLEAR
FOR nCount = 1 TO 254
IF !EMPTY(TAG(nCount)) && Checks for tags in the index
? CDX(nCount) && Display structural index names
ELSE
EXIT && Exit the loop when no more tags are found
ENDIF
ENDFOR