TVariable Label Operators

Assigns or retrieves the label value of a TVariable.

const char16_t* FindLabel(
   unsigned int options = TVariable::FIRST,
   const char16_t *label = NULL
) const;

const char16_t* GetLabel() const;

unsigned int SetLabel(
   unsigned int index,
   const char16_t *newLabel

unsigned int Erase(
   const char16_t *startLabel,
   const char16_t *finishLabel = NULL


optionsSeach options. See TVariable enum for more details on the various values
labelthe label value.
indexthe current index value.
newLabelthe new label value.
startLabelthe label from which to start.
finishLabelthe label that finishes the operation, if set to default, then it will have the same value of startLabel.

Return Values

The methods returning "const char16_t*" will return the string value of the label. SetLabel will return an error code - see Error Codes.


Example Use
  • C++
#include "TScript.h"

int wmain(int argc, wchar_t* argv[])
   TVariable var;
   for(const wchar_t *label = var.FirstLabel();
      ; label != NULL; label = var.findLabel(TVariable::NEXT,label))
         TVariable("This label = ") 
            + label + ", Has value = "
            + var[i].AString()
   return NO_ERROR;

Also See

Index Operators
Listen All
Comments (0)
Characters left: 2500
Ekky Software Homepage T-Accounts Online ObjectDatabase++ TScript Ekky Software Homepage T-Accounts Onlinee ObjectDatabase++ TScript