Skip to content

Commit 80aef38

Browse files
authored
Update integer type descriptions in about.md
Response to comments in exercism#713 (@BNAndras)
1 parent 4fc6266 commit 80aef38

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

concepts/numbers/about.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Int.MAX_VALUE // => 2147483647 (maximum for a 32-bit signed integer)
1313
Int.MAX_VALUE + 1 // -2147483648 (overflow gives a negative result!)
1414
```
1515

16-
- Integers can be `Byte`, `Short`, `Int` or `Long`, respectively 8, 16, 32 and 64 bits (1, 2 4, 8 bytes).
17-
- Unsigned integers have a `U` prefix: `UByte`, `UShort`, `UInt` or `ULong`.
16+
- Integers can be `Byte`, `Short`, `Int` or `Long`, respectively 8, 16, 32 and 64 bits (1, 2 4, 8 bytes), and can be positive or negative.
17+
- Unsigned integers have a `U` prefix: `UByte`, `UShort`, `UInt` or `ULong`, and can only represent numbers ≥ 0.
1818
- Floating point types are `Float` (32-bit) or `Double` (64-bit).
1919

2020
Integer variables relying on type inference default to `Int`, even on 64-bit machines, but floating point variables default to `Double`.
@@ -31,7 +31,7 @@ val oneFloat = 1.0f // Float
3131
val lightSpeed = 3.0e8 // scientific notation (units of m/s)
3232
```
3333

34-
Hexadecimal and binary literals are conventional: `0x7F` and `0b100101` respectively.
34+
Hexadecimal and binary literals are the same as in many languages: `0x7F` and `0b100101` respectively.
3535
Octal literals are not supported in Kotlin.
3636

3737
## Arithmetic

0 commit comments

Comments
 (0)