Files
Decodal/doc/manual/source/language/value/index.md
T

21 lines
836 B
Markdown

# Value
This chapter defines the kinds of values handled by the language.
Primitive types are built-in constraints that values must satisfy, rather than ordinary data values.
```dcdl
name = String;
retry = Int default 3;
ratio = Float;
enable = Bool default true;
tags = [...String];
```
The primitive types are `String`, `Int`, `Float`, and `Bool`.
`Unknown` is not a primitive type; it is the top abstract range containing every Decodal value. An `Unknown` without a concrete value or default cannot be materialized.
An array is not a primitive type and is described as `[...T]` with a required element constraint.
Links to each type specification are collected in the [manual contents](../../index.md).
See [Constraints and Defaults](../constraints-and-defaults.md) for details about primitive types and constraint composition.