Home

Literais

Literais is a term used in Portuguese-language programming literature to refer to literals, the fixed values embedded directly in source code. Literais specify constants that do not change during program execution and include numbers, strings, characters, booleans, and null values. They are contrasts to identifiers and expressions that compute values at runtime.

Typical categories of literais include integer and floating-point literals, string literals, character literals, boolean literals, and

In language design, literais are often parsed as fixed, compile-time values and may participate in optimizations

See also: literals (computing), constants, data types. In natural-language studies, the term literals can also refer

null
literals.
Examples
are
42,
-3,
0x2A,
3.14
for
numbers;
"Hello"
or
'Hi'
for
strings
and
characters;
true
or
false
for
booleans;
and
null
or
nil
for
absence
values.
The
exact
set
of
literais
and
their
syntax
vary
by
language,
and
some
languages
add
prefixes,
suffixes,
or
separators
to
clarify
type
or
base,
such
as
long
or
unsigned
suffixes
or
1_000
for
readability.
like
constant
folding.
Some
languages
treat
certain
literais
as
immutable
and
allow
them
to
be
used
directly
in
places
where
a
constant
is
required,
while
others
may
impose
restrictions
based
on
type
systems.
The
way
literais
are
represented
can
affect
memory
layout,
performance,
and
readability,
making
their
consistent
handling
a
common
area
of
compiler
implementation.
to
literal
readings
of
text
as
opposed
to
figurative
interpretations.