Home Texas Home

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

index The index value.
oldIndex The old index value.
newIndex The new index value.
startIndex The first index.
finishIndex The 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());

Since

Also See

Label Operators

Copyright © 2007-2009, Ekky Software Pty Ltd.