Quantities is very tolerant with mixed data types. If it finds a number where text is expected, it converts the number to text (and vice-versa). Where text is found when a number is expected, a conversion from the text to a number will be attempted – the result will be zero if no numeric characters are found. So the following statements are functionally identical:
element.height > 2
element.height > “2”
The same is true for different unit types, e.g. you can mix any type of property even if they mix volume, length etc., e.g.:
element.area > element.perimeter
The unit type of the bill item is also irrelevant to the units of any values used in the calculation. A bill can measure quantities in non-standard ways, e.g. bags, so the software assumes the user knows what is required.
Comments
0 comments
Please sign in to leave a comment.