Home Explore Blog CI



nushell

lang-guide/chapters/types/basic_types/int.md
1697a67086474eca6bbcf786aeede20ee96c30dce4c2aaa50000000300000577
# Integer

|                     |                                                                                                                                                           |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Description:**    | Numbers without a fractional component (positive, negative, and 0)                                                                                        |
| **Annotation:**     | `int`                                                                                                                                                     |
| **Literal syntax:** | A decimal, hex, octal, or binary numeric value without a decimal place. E.g., `-100`, `0`, `50`, `+50`, `0xff` (hex), `0o234` (octal), `0b10101` (binary) |
| **Casts**:          | [`into int`](/commands/docs/into_int.md)                                                                                                                  |
| **See also:**       | [Types of Data - Integers](/book/types_of_data.md#integers)                                                                                               |

## Additional Language Notes

- Integers are internally represented as signed 64-bit numbers with two's-complement arithmetic.

Chunks
92164ac4 (1st chunk of `lang-guide/chapters/types/basic_types/int.md`)
Title: Integer Data Type in Nushell
Summary
This section defines the integer data type in Nushell. Integers are whole numbers (positive, negative, or zero) represented internally as signed 64-bit numbers. The annotation for integers is `int`. Examples of integer literals include decimal, hexadecimal, octal, and binary representations. The `into int` command can be used to cast values to integers.