TVariable Array access Operators

Find and return a TVariable within a structured variable or array.

TVariable& operator[](
   int index
);

TVariable& operator[](
   unsigned int index
);

TVariable& operator[](
   long index
);

TVariable& operator[](
   const wchar_t *label
);

TVariable& operator[](
   const TVariable &variable
);

Parameters

index32 bit unsigned array index value.
label16 bit wide character string for TVariable label.
variableTVariable that contains either an index or label value.

Return Values

These method will return the variable that fits the position, if no one exists, it will create a new one at that position.

Remarks

  • You need to be careful with the label value as MS VC++ don't provide a linking error if you use an ASCII string. All labels are 16 bit unicode string.
Example Use
TVariable var;
var[0][TEXT("fieldName")] = TEXT("This is a string");

Also See

Index Operators, 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