blob: eca507ed73fa2efb0763421ef82805ddb0db0f72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
\section{s:const}{Constants}
%HEVEA\cutname{const.html}
\ikwd{false\@\texttt{false}}
\ikwd{true\@\texttt{true}}
\ikwd{begin\@\texttt{begin}}
\ikwd{end\@\texttt{end}}
\begin{syntax}
constant:
integer-literal
| int32-literal
| int64-literal
| nativeint-literal
| float-literal
| char-literal
| string-literal
| constr
| "false"
| "true"
| "("")"
| "begin" "end"
| "[""]"
| "[|""|]"
| "`"tag-name
\end{syntax}
See also the following language extension:
\hyperref[ss:extension-literals]{extension literals}.
The syntactic class of constants comprises literals from the four
base types (integers, floating-point numbers, characters, character
strings), the integer variants, and constant constructors
from both normal and polymorphic variants, as well as the special
constants @"false"@, @"true"@, @"("")"@,
@"[""]"@, and @"[|""|]"@, which behave like constant constructors, and
@"begin" "end"@, which is equivalent to @'('')'@.
|