- Types of integers
- Different types of integers are available in WLanguage
- Notes
- Default value
- Hexadecimal value
- Thousand separator
- Differences between WINDEV 5.5 and WINDEV 27
The different types of integers
Different types of integers are available in WLanguage | | | Value included between |
---|
| -2 x 109 and 2 x 109 (roughly) | | -128 and 127 (inclusive) | | -32.768 and 32.767 (inclusive) | | -2 x 109 and 2 x 109 (roughly) | | -9 x 1018 and 9 x 1018 (roughly) | | 0 and 4 x 109 | | 0 and 255 (inclusive) This type is equivalent to the unsigned 1-byte integer. | | 0 and 255 (inclusive) | | 0 and 65.535 (inclusive) | | 0 and 4 x 109 (roughly) | | 0 and 18 x 1018 | | automatically adapts to the size supported by the compilation mode (4 bytes for a program compiled in 32 bits, 8 bytes for a program compiled in 64 bits). |
The exact values for these different types of integers can be found in the Limits.wl file found in the Personal\External subdirectory of the setup directory of WINDEV, WEBDEV and WINDEV Mobile. Remark: All the advanced types (different from the "Integer" type) are recommended when using the Windows APIs. Default value An "Integer" variable that is declared but not initialized is equal to 0. Hexadecimal value To enter an hexadecimal value in the code, the hexadecimal value must be prefixed by "0x".
MyVariable is int MyVariable = 0x4D5
Remark: The '_' character can be used as block separator in the hexadecimal numbers. The blocks can have a size equal to 2, 4 or 8 characters long. Example:
Nb1 is int = 0x_12_15_A4_BC Nb2 is int = 0x_CD4A_DE58
Thousand separator You can use spaces and underscore characters to separate thousands in numbers. For example:
num1 is int num1 = 123 456 let num2 = 246_789
This page is also available for…
|
|
|
|