BSL Data Types
Business Script Language (BSL) uses a single data type: Variant. A Variant is a versatile data type that can hold different kinds of data, depending on how it is used. Since it's the only data type available in BSL, every function within BSL returns a Variant.
- Variant can contain numeric or string information.
- Variant will act as a number when used in numeric context and as text when used within a string context. For example, when you are handling data that looks like numbers, BSL automatically treats it as numbers and applies numeric operations. Similarly when you are handling data that can only be string, BSL treats it as string data.
- You can always make numbers behave as strings by enclosing them in double quotes
(
" "
). For example, using "222" instead of 222 makes BSL treat it as a string.