6.3.1 Types of literals
A literal can be a numeric literal or a general literal. The following table lists types of literals.
No. |
Type of literal |
Description |
Type of literal |
Description |
|
---|---|---|---|---|---|
1 |
Numeric literals |
Literals that represent numeric values. The literals listed at the right are numeric literals. |
Integer literal |
A literal that represents an integer. |
|
2 |
Decimal literal |
A literal that represents a number with a decimal point. |
|||
3 |
Floating-point numeric literal |
A literal that represents a number with a decimal point. |
|||
4 |
General literals |
Literals that represent characters, dates, times, and binary data. The literals listed at the right are general literals. |
Character string literal |
A literal that represents characters. |
|
5 |
Date literal |
A literal that represents a date. |
|||
6 |
Time literal |
A literal that represents time. |
|||
7 |
Time stamp literal |
A literal that represents a date and time. |
|||
8 |
Binary literal |
Hexadecimal-format binary literal |
A binary literal represented in hexadecimal format. |
||
9 |
Binary-format binary literal |
A binary literal represented in binary format. |