DF_FILE_NEXT_USED
See Also: Get_Attribute, Set_Attribute, DF_FILE_NEXT_EMPTY, DF_FILE_NEXT_OPENED
The next occupied number in the filelist (in ascending order).
Level
Table
Supported by
All Drivers
Type
Numeric, permanent
Access
Read / Write
Values
0 .. 4095
Remarks
This attribute returns the next used slot in the filelist (in ascending order). A filelist slot is considered used if the DF_FILE_ROOT_NAME attribute of that slot is not empty. If there is no higher-numbered used slot in the file list, DF_FILE_NEXT_USED is 0 (zero).
Procedure ShowUsedTables
Handle hTable
String sRoot
String sDisplay
String sTable
Showln "Used tables:"
Move 0 To hTable
Repeat
Get_Attribute DF_FILE_NEXT_USED Of hTable To hTable
If (hTable > 0) Begin
Get_Attribute DF_FILE_ROOT_NAME Of hTable To sRoot
Get_Attribute DF_FILE_DISPLAY_NAME Of hTable To sDisplay
Get_Attribute DF_FILE_LOGICAL_NAME Of hTable To sTable
Showln " " hTable ": " sTable " (" sRoot ", " sDisplay ")"
End
Until (hTable = 0)
End_Procedure // ShowUsedTables
The sample procedure above determines and displays the filelist slot numbers and names of all tables used in the filelist.