
TVariable Index Operators
Assigns or retrieves the index value of a TVariable.
unsigned int FindIndex( unsigned int options = TVariable::FIRST, __int64 index = 0 ) 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
| options | Seach options. See TVariable enum for more details on the various values |
| 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, else use the TVariable::length value, to delete all the to the end. |
Return Values
These methods the index value for each TVariable.
Remarks
Example Use
- C++
#include "TScript.h"
int wmain(int argc, wchar_t* argv[])
{
TVariable var;
var.SetStructure("{\"one\",\"two\",\"three\",\"four\",\"five\","
"12=>\"six\",15=>\"seven\",27=>\"eight\"}");
for(int i = var.FindIndex(); i < var.length; i = var.FindIndex(TVariable::NEXT,i]))
MessageBox((wchar_t*)var[i].WString("This value = %s"));
return NO_ERROR;
}Also See
Label OperatorsListen All
Comments (0)

