CASTING Casting to (std::string): Native type | Value returned ------------+------------------------------- VARIANT_NUL | empty string VARIANT_STR | copy of native string VARIANT_BOO | "true" or "false" as string VARIANT_INT | string representation of integer, e.g. "42" VARIANT_FLO | string representation of double, e.g. "-42.5" Casting to (bool): Native type | Value returned ------------+------------------------------- VARIANT_NUL | boolean false VARIANT_STR | false for zero-length string, true otherwise VARIANT_BOO | native value (true or false) VARIANT_INT | false for value 0, true otherwise VARIANT_FLO | false for value 0., true otherwise Casting to int: Native type | Value returned ------------+------------------------------- VARIANT_NUL | 0 VARIANT_STR | exception thrown VARIANT_BOO | 0 for false, 1 for true VARIANT_INT | native value VARIANT_FLO | native value truncated to integer part Casting to float, double: - similar to casting to int, except native doubles are not truncated to int