Skip to content

Commit 40e6af3

Browse files
HCLarsenysbaddadenSijastraight-shoota
authored
Improve docs for Int to mention Int128 and UInt128 (#16529)
Co-authored-by: Julien Portalier <julien@portalier.com> Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl> Co-authored-by: Johannes Müller <straightshoota@gmail.com>
1 parent 74a5149 commit 40e6af3

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

src/int.cr

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Int is the base type of all integer types.
22
#
3-
# There are four signed integer types: `Int8`, `Int16`, `Int32` and `Int64`,
4-
# being able to represent numbers of 8, 16, 32 and 64 bits respectively.
5-
# There are four unsigned integer types: `UInt8`, `UInt16`, `UInt32` and `UInt64`.
3+
# There are five signed integer types: `Int8`, `Int16`, `Int32`, `Int64` and
4+
# `Int128`, being able to represent numbers of 8, 16, 32, 64, and 128 bits respectively.
5+
# There are five unsigned integer types: `UInt8`, `UInt16`, `UInt32`, `UInt64`
6+
# and `UInt128.
67
#
78
# An integer literal is an optional `+` or `-` sign, followed by
89
# a sequence of digits and underscores, optionally followed by a suffix.
@@ -12,15 +13,17 @@
1213
# ```
1314
# 1 # Int32
1415
#
15-
# 1_i8 # Int8
16-
# 1_i16 # Int16
17-
# 1_i32 # Int32
18-
# 1_i64 # Int64
16+
# 1_i8 # Int8
17+
# 1_i16 # Int16
18+
# 1_i32 # Int32
19+
# 1_i64 # Int64
20+
# 1_i128 # Int128
1921
#
20-
# 1_u8 # UInt8
21-
# 1_u16 # UInt16
22-
# 1_u32 # UInt32
23-
# 1_u64 # UInt64
22+
# 1_u8 # UInt8
23+
# 1_u16 # UInt16
24+
# 1_u32 # UInt32
25+
# 1_u64 # UInt64
26+
# 1_u128 # UInt128
2427
#
2528
# +10 # Int32
2629
# -20 # Int32

0 commit comments

Comments
 (0)