liveBook · Manning

Literal

A literal is a language construct that directly denotes a fixed value or specifies an exact value permitted by a type.

How 6 Manning books explain it

Modern C, Third Edition

A literal is source text that denotes a fixed value directly in a C program.

How it is used
Identifies fixed values written directly in C source and distinguishes them from identifiers that name program entities.
How deep it goes
Works through numeric bases, exponent forms, character and string notation, and type-dependent examples; does not develop literal parsing internals.
Examples
Compares `077` with 63, `0b1010` with 10, and `strtoul("0b1", nullptr, 2)` across C17 and C23.
What you can do after
Evaluate/understand it by reading common C literal forms and recognizing when type or string-conversion rules change their interpretation.

Read how Modern C, Third Edition explains literal →

Modern C

A literal is a C source notation that directly represents a fixed value.

How it is used
Identifies fixed values written in C code and supplies integer values for preprocessor platform checks.
How deep it goes
Defines literals, compares numeric spellings, and works through sign and integer-type rules without developing all type-selection cases.
Examples
Uses decimal, octal, and hexadecimal constants, adjacent strings passed to `puts`, and a table comparing integer types and negated values.
What you can do after
Evaluate/understand literal spellings, distinguish negation from a numerical literal, and determine a decimal integer literal’s first fitting signed type.

Read how Modern C explains literal →

Clojure: The Essential Reference

A compile-time literal is a fixed Clojure value recognized by the compiler without evaluating an expression to obtain it.

How it is used
Provides fixed branch tests for fast conditional selection with `case`.
How deep it goes
Defines accepted test forms and explains why expression-shaped tests are not evaluated, including duplicate-test and missing-default errors.
Examples
Uses numeric branches, expression-shaped tests, quoted-symbol collisions, and grouped operator names.
What you can do after
Apply it via `case` to choose valid constant tests and avoid mistaking expressions for evaluated tests.

Read how Clojure: The Essential Reference explains literal →

Rust in Action: Systems programming concepts and techniques

A literal form is Rust syntax that directly initializes or denotes a value according to the type's literal representation.

How it is used
Uses literal syntax to supply values for variable bindings and initialize a complex number’s fields.
How deep it goes
Explains numeric suffixes, separators, integer bases, and field initialization through examples rather than a complete literal-syntax reference.
Examples
Compares binary, octal, and hexadecimal integers, then initializes complex numbers with fields and `Complex::new()`.
What you can do after
Apply it via the `num` crate to initialize a complex value with field syntax or `Complex::new()`.

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

Learn SQL in a Month of Lunches

A literal value is a fixed constant written directly in an SQL statement rather than retrieved from a column or calculated dynamically.

How it is used
Uses fixed values to assign variables, label UNION rows, pass procedure arguments, and establish column defaults.
How deep it goes
Defines literals and demonstrates them in SELECT, UNION, defaults, and procedure calls, but does not develop formal expression theory.
Examples
Demonstrates date assignment, customer and author labels, the argument 1049, and a shipment-date default.
What you can do after
Apply it via SELECT, UNION, DEFAULT constraints, and stored-procedure calls when a known value belongs directly in SQL.

Read how Learn SQL in a Month of Lunches explains literal →

Julia as a Second Language

A number literal is a source-code notation that directly represents a numeric value with digits rather than a variable name.

How it is used
Represents numeric values directly in Julia source while selecting or signaling their numeric type.
How deep it goes
Defines numeric notation, demonstrates inferred types and suffixes, and briefly extends literals through macros without teaching macro internals.
Examples
Uses decimal, hexadecimal, rational, Float32, Float16, BigInt, and custom Int8 literal examples inspected in the REPL.
What you can do after
Apply it to write numeric values, inspect their types, choose conversions, and avoid confusing floating-point suffixes with multiplication.

Read how Julia as a Second Language explains literal →

Related concepts

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.