Mixing types

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.

Notes: 
In mixed expressions, numeric calculations are performed first. All numeric operators have precedence over the & operator.


Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400