
TVariable Casting Operators
Changes the Cast of a given variable or safely returns a cast of the data behind the variable.
TVariable& Cast( VariableType newType ); VariableType Type( const char16_t **returnType = NULL ); bool Boolean(); double Decimal( unsigned int format = 0 ); __int64 Integer( unsigned int format = 0 ); TVariable* Reference(); FILETIME UTCTime(); HANDLE Handle();/*Windows Version*/ int Handle();/*Linux and Solaris Versions*/ const BYTE* AString( unsigned int format = 0 ); const BYTE* AString( const BYTE *format ); const char16_t* WString( unsigned int format = 0 ); const char16_t* WString( const char16_t *format ); TVariable BString( unsigned int format = 0 );
Parameters
| newType | the new variable type, TVariable::NONE will reset the variable. |
| returnType | the current variable type, TVariable::NONE would mean that the value has not been set. |
| format | See TVariable enum for more details with the integer values. For the string value, will format similar to printf(). |
Return Values
These methods will return the modified TVariable, or a temporary const TVariable created on the stack.
Remarks
Example Use
- C++
#include "TScript.h"
int wmain(int argc, wchar_t* argv[])
{
TVariable var("123"), var2;
var2[u"This is a label"] = var.Integer() + 10;
//should return {"This is a label"=>133}
MessageBox((wchar_t*)var2.WString(]);
return NO_ERROR;
}Also See
ToStringListen All
Comments (0)

