|Part 2: Becoming a TestArchitect power user / Lesson #5: Working with variables and expressions|
Text and numeric data types can be combined in cell expressions.
Operations (specifically, concatenation) and functions that operate on strings can nevertheless accept numeric values as operands. These numeric values are converted to strings automatically.
Conversely, it is also possible to perform numeric operations on string values, with those strings being automatically converted to numbers. Note however that while any number may be converted to a string, not every string is convertible to a number. Strings such as 4.5 and -21 are convertible to numbers; while strings such as $20, 7.5%, and “The sales tax in New York” are not. Any attempt to use a non-convertible string as an operand in a numeric operation or function results in an error message presented in the execution results. For more details, see Automatic conversion of data types.
Because data types in TestArchitect can be readily converted, it is possible to mix string and numeric operations and functions in an expression.