Int64
conversion-functions int64
concept
- int64 is a 64 bits (8 bytes) signed integer value-type.
- int64() is a function converting data items or units of other value types to the int64 value type.
This page describes the int64() function.
syntax
- int64(a)
- literal i64
definition
int64(a) results in a 64 bits(8 bytes) signed integer item converted from item a. The function results for:
- integer data items: the integer value is interpreted as int64 value, if the value exceeds the allowed value range for the int64 value type, the resulting value will be null;
- float32/64 data items: the value before the decimal point (so 1.9 will be rounded off to 1 and 2.0 to 2). If the value exceeds the allowed value range for the int64 value type, the resulting value will be null;
- boolean data items: 1 for True values and 0 for False values;
- string data items, if the value starts with an allowed numeric value for the value type, this value is converted to a int64 value type. Other characters after the numeric values are ignored. If the string does not start with an allowed numeric value for the value type, the resulting value will be null;
- units, a 64 bits(8 bytes) signed integer unit of the converted unit.
applies to
- data item or unit with Numeric, uint2, uint4, bool or string value type
since version
- 5.15
- i64 suffix: since 7.105
example
1. parameter<int64> int64Numeric1 := int64(1);
2. parameter<int64> int64Numeric1 := 1i64;
3. attribute<int64> int64A (ADomain) := int64(A);
4. attribute<int64> int64B (ADomain) := int64(B);
A(float32) | B(string) | int64A | int64B |
---|---|---|---|
0 | ‘Hello’ | 0 | null |
1 | ‘Test’ | 1 | null |
1000000 | null | 1000000 | null |
-2.5 | ‘Two words’ | -2 | null |
99.9 | ‘88a’ | 99 | 88 |
ADomain, nr of rows = 5