TVariable Index Operators

Assigns or retrieves the index value of a TVariable.

unsigned int FirstIndex() const;

unsigned int NextIndex(
   unsigned int index
) const;

unsigned int GetIndex() const;

unsigned int SetIndex(
   unsigned int oldIndex,
   unsigned int newIndex
);

unsigned int Erase(
   unsigned int startIndex,
   unsigned int finishIndex = 0
);

Parameters

indexthe index value.
oldIndexthe old index value.
newIndexthe new index value.
startIndexthe first index.
finishIndexthe last index, if allowed to default, it will be set to the startIndex value.

Return Values

These methods the index value for each TVariable.

Remarks

Example Use
TVariable var;
var.SetStructure({"one","two","three","four","five",
      12=>"six",13=>"seven",14=>"eight"});
for(int i = var.FirstIndex(); i < var.length; i = var.NextIndex(i))
			MessageBox(TVariable("This value = ") + var[i].ToString());

Also See

Label Operators
Comments (0)Listen All
Characters left: 2500
 
Ekky Software Homepage Ekky Software Homepage ObjectDatabase++ TScript Ekky Software Homepage Ekky Software Homepage ObjectDatabase++ TScript