liveBook · Manning

Integer

Also called int

An integer is a whole-number mathematical value, including negative numbers, zero, and positive numbers, with no fractional part.

How 15 Manning books explain it

Python Workout, Second Edition

An integer is a whole-number numeric value without a fractional part, represented in Python by the int type.

How it is used
Uses integers for whole-number input, random values, comparisons, indexes, counters, and numeric calculations.
How deep it goes
Defines int and practices conversion, comparison, bases, and validation, but stops short of integer implementation internals.
Examples
Practices integers through a number-guessing game, run-time accumulation, hexadecimal conversion, and summing or averaging exercises.
What you can do after
Build integer-driven programs that parse input, compare values, generate random numbers, and accumulate numeric results.

Read how Python Workout, Second Edition explains integer →

Python Workout: 50 ten-minute exercises

An integer is a Python numeric value representing a whole number without a fractional component.

How it is used
Uses integers for guesses, indexes, counts, conversions, calculations, and exact small-unit representations.
How deep it goes
Explains definition, conversion, comparison, validation, inclusive random ranges, and practical precision choices without covering integer internals.
Examples
Demonstrates guessing games, cents-based money, filtered numeric text, and file lines containing integer values.
What you can do after
Build it from scratch by converting input, generating integer ranges, comparing values, validating failures, and accumulating integer data.

Read how Python Workout: 50 ten-minute exercises explains integer →

Modern C, Third Edition

An integer type is a C type whose values represent whole numbers, with either signed or unsigned representation.

How it is used
Explains how integer types and literals determine value ranges and arithmetic behavior in C.
How deep it goes
Traces precision, promotions, literal typing, and signed representation, including platform-dependent cases.
Examples
Compares decimal and hexadecimal literals at integer limits and illustrates time fields stored as bit-fields.
What you can do after
Evaluate integer literal types and recognize portability constraints on precision and promotion.

Read how Modern C, Third Edition explains integer →

Get Programming: Learn to code with Python

int is Python's built-in type and constructor for representing or converting values to integers.

How it is used
Represents whole-number values for arithmetic, type conversion, and calculations involving minutes or user input.
How deep it goes
Defines int, demonstrates arithmetic and several conversions, and works through extracting whole hours; does not examine integer storage internals.
Examples
Uses 123-minute conversion, a user-entered number squared, and integer-controlled string repetition.
What you can do after
Apply it via Python’s int() to convert numeric input and extract whole hours from a division result.

Read how Get Programming: Learn to code with Python explains integer →

Modern C

signed int is a C signed integer type capable of representing both negative and nonnegative integer values.

How it is used
Explains signed integer types as part of C's basic numeric types and rules for arithmetic and constants.
How deep it goes
Traces type selection and promotion, then examines sign representations and their bit-level differences.
Examples
Contrasts -32768 with -0x8000 on a specified platform and tabulates constant types under a 32-bit representation assumption.
What you can do after
Evaluate and understand how integer notation, range, and signedness affect the type of a negated constant.

Read how Modern C explains integer →

Learn Rust in a Month of Lunches

An integer is a whole-number numeric value without a fractional part.

How it is used
Introduces whole-number values as Rust primitive types and uses them to teach type inference.
How deep it goes
Explains signedness, bit widths, binary representation, ranges, and type annotations with focused examples.
Examples
Uses u8 and u16 limits, annotated number literals, and a compiler error from casting i32 to char.
What you can do after
Apply integer type annotations in Rust and choose a type using signedness and value range.

Read how Learn Rust in a Month of Lunches explains integer →

Go in Action, Second Edition

An integer type represents whole-number values without a fractional component.

How it is used
Uses integers for arithmetic, indexing, and configuration arguments, with int as the general-purpose choice.
How deep it goes
Explains signed and unsigned ranges, architecture-dependent sizes, aliases, selection trade-offs, and wraparound.
Examples
Uses integer declarations, equivalent numeric literal notations, unsigned wraparound, and configuration-value validation.
What you can do after
Apply integer type selection and validate signed inputs while recognizing unsigned wraparound.

Read how Go in Action, Second Edition explains integer →

Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS

An integer is a whole number with no fractional or decimal portion.

How it is used
Clarifies numeric parameter requirements and prevents text input from producing incorrect PowerShell arithmetic.
How deep it goes
Defines whole numbers and demonstrates typed input, runtime inspection, arithmetic, command arguments, and conversion failures.
Examples
Demonstrates Read-Host input, [int] variables, multiplication, conversion errors, Get-Member inspection, and Get-Process -Id.
What you can do after
Apply it via PowerShell by declaring numeric variables, validating their runtime type, performing arithmetic, and supplying command identifiers.

Read how Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS explains integer →

Python How-To

int is Python's built-in numeric type for representing integers and the callable that constructs such values.

How it is used
Converts integer-valued strings into numbers for calculations, comparisons, and subsequent processing.
How deep it goes
Explains integer-string conversion, failed casts, and exception handling, without detailing int internals.
Examples
Uses positive and negative integer strings, age comparisons, and task urgency records, including malformed input.
What you can do after
Apply it via the int constructor to convert integer strings and handle invalid input with try...except.

Read how Python How-To explains integer →

The Quick Python Book, Fourth Edition

An integer is a whole-number value with no fractional component and, in Python, arbitrary magnitude subject to available memory.

How it is used
Uses integers for whole-number values and demonstrates their arithmetic and conversion in Python.
How deep it goes
Defines integer range, arithmetic result types, division, and conversions, including string parsing with an optional base.
Examples
Demonstrates integer arithmetic, large values, input conversion, and parsing strings in bases 2, 8, and 16.
What you can do after
Apply integer arithmetic, select division behavior, and convert input or numeric strings with Python’s int().

Read how The Quick Python Book, Fourth Edition explains integer →

Rust in Action: Systems programming concepts and techniques

An integer is a whole-number value without a fractional component.

How it is used
Uses integers for arithmetic, identifiers, and control over enum representation.
How deep it goes
Explains literals, types, numeric bases, bit widths, and overflow, including contrasting build behavior.
Examples
Demonstrates base-formatted literals, a repeatedly incremented u16 counter, and integer satellite identifiers.
What you can do after
Apply integer literals and types in Rust programs and recognize overflow when values exceed their range.

Read how Rust in Action: Systems programming concepts and techniques explains integer →

Julia as a Second Language

An integer is a whole number with no fractional component, including positive, negative, and zero values.

How it is used
Introduces integers through calculator-style Julia operations and practical numeric type choices.
How deep it goes
Explains fixed-width types, ranges, overflow, division, and rounding, while directing unfamiliar readers to background on number types and overflow.
Examples
Uses Int8 range checks, an out-of-range UInt8 conversion, quotient and remainder calculations, and rounding to an integer type.
What you can do after
Apply it via Julia to select integer types, inspect their ranges, and calculate integer quotients and remainders.

Read how Julia as a Second Language explains integer →

Clojure: The Essential Reference

The int type is a fixed-width signed integer type representing whole-number values in the Java numeric type system.

How it is used
Deploys fixed-width integer arithmetic for hashing, image processing, coordinates, and other algorithms requiring int behavior.
How deep it goes
Defines 32-bit bounds, two’s-complement rollover, operator arities, casting, return types, and worked algorithmic uses.
Examples
Demonstrates typed addition, boundary rollover, line drawing, pixel coordinates, and Java int-array painting.
What you can do after
Apply unchecked-*-int operators to implement fixed-width arithmetic and integer-based algorithms with explicit overflow behavior.

Read how Clojure: The Essential Reference explains integer →

The Well-Grounded Rubyist, Fourth Edition

Integer is Ruby's built-in class for representing whole-number values.

How it is used
Represents single whole-number values and supports arithmetic within Ruby’s scalar-object model.
How deep it goes
Explains object membership, arithmetic behavior, numeric bases, conversion, and operator methods through evaluated examples.
Examples
Uses arithmetic tables, hexadecimal and octal literals, base conversions, ASCII conversion, and a temperature converter.
What you can do after
Evaluate whole-number expressions, choose integer or floating-point division, and write simple integer-based Ruby programs.

Read how The Well-Grounded Rubyist, Fourth Edition explains integer →

PostgreSQL Mistakes and How to Avoid Them

An integer data type represents whole-number values without a fractional component.

How it is used
Uses integers for whole-number data while warning that arithmetic and migration mappings can silently produce incorrect results.
How deep it goes
Explains truncating division, implicit casting, zero-divisor safeguards, and cross-database mapping consequences.
Examples
Demonstrates order percentages, pg_typeof(), explicit casts, division-by-zero queries, NULLIF, and COALESCE.
What you can do after
Diagnose integer arithmetic with pg_typeof(), cast operands, calculate fractional results, and prevent division-by-zero failures.

Read how PostgreSQL Mistakes and How to Avoid Them explains integer →

Also covered in

What to know first

Related concepts

Questions about integer

What is integer?

An integer is a whole-number mathematical value, including negative numbers, zero, and positive numbers, with no fractional part.

Which Manning books explain integer?

Python Workout, Second Edition, Python Workout: 50 ten-minute exercises, Modern C, Third Edition, Get Programming: Learn to code with Python, Modern C, Learn Rust in a Month of Lunches, Go in Action, Second Edition, Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS and 7 more.

What should I know before learning integer?

Manning books that teach integer usually introduce string, Python, function and binding first.

What is the difference between integer and byte type?

An integer is a whole-number mathematical value, including negative numbers, zero, and positive numbers, with no fractional part. A byte type is a fixed-width integer type occupying eight bits, with signedness and numeric range determined by the language.

What kinds of integer are there?

Kinds of integer include int32.

What is integer a kind of?

Integer is a kind of number type. A numeric type is a type whose values represent numbers with a defined representation and support numerical operations.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.