Script Variable Data Types
There are four data types with different value ranges and permitted values that restrict the type of values you can assign to script variables. Declare the data types when you define a variable using a :DEFINE script statement.
The following data types are available:
-
unsigned
Type:
Positive integers without algebraic signs
Value range: 0 to 9 999 999 999 999 998
-
signed
Type:
Integers with algebraic signs
Value range:-9 999 999 999 999 998 to 9 999 999 999 999 998
-
string
Type:
String
Value range:
String of any length, all characters that correspond to the Latin1 codepage can be used.
Note: Be careful when you copy and paste contents from browsers or other tools, as these may use different encoding that does not work here
-
float
Type:
Floating-point numbers with algebraic signsValue range:-9 999 999 999 999 998.9999999999999999 to +9 999 999 999 999 998.9999999999999999
Note: You cannot change the data type of a variable.
Warnings:
-
Be aware of the data type when assigning a value to a variable. A value that is not permitted due to the restrictions of a data type will cause a runtime error.
-
Floating-point numbers can cause imprecise results in arithmetic operations due to truncation. The Automation Engine uses double precision to represent floating-point numbers in binary, and rounds the output.
Tip: You can use a script function to convert the data type of a value to a different data type. For more information, see CONVERT.
See also: