Home Explore Blog CI



nushell

1st chunk of `lang-guide/chapters/types/basic_types/int.md`
92164ac44e7746e0de5212734cc6e15a5d031122b2a743700000000100000577
# 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.

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.