Default Export Value
A default export value is the value used when a cell or cell region (e.g., a multi-column span or subtable block) is blank.
It is specified alongside Type or Subtable Type using the dataType=value syntax:
| Type Definition | Default Export Value |
|---|---|
int8=-1 |
-1 |
string="" |
Empty string "" |
duration=1ms |
Duration of 1ms |
enum@Rarity=common |
Enum item common |
>>[]int=/ |
Zero value (which evaluates to null) |
vector|2|int8={} |
Zero-valued vector [0, 0] |
**map={}{} |
Empty subtable map |
If no default export value is specified, blank cells and cell regions result in an export error.
Shorthands
Section titled “Shorthands”The following shorthands have fixed meanings:
| Shorthand | Meaning |
|---|---|
/ |
The type’s zero value (0 for integers, "" for strings, false for bool, null for []T, etc.). Example: int=/. |
{} |
An empty container or a zero-valued object. Example: []int={}, >>tuple|string|int={}. |
{}{} |
An empty container; additionally treats a blank (value) row as a zero-valued object. Only valid for fixed-size subtable arrays (**[N]) and subtable maps (**map). Example: **map={}{}. |
Zero Value List
Section titled “Zero Value List”The / shorthand represents the following zero value for each type:
| Type Category | Type(s) | Zero Value |
|---|---|---|
| Basic Types | int, int8, int16, int32, int64,uint, uint8, uint16, uint32, uint64 |
0 |
float, float32, float64 |
0 |
|
string |
"" |
|
bool |
false |
|
datetime |
null |
|
duration |
0s |
|
ref |
0 or "" |
|
enum |
0 |
|
l10n |
"" |
|
path |
"" |
|
rgba |
"" |
|
| Passive Types | backref |
0 or "" |
backref-n |
null |
|
origin |
auto-determined | |
| Compact Types | >>[]T |
null |
>>[N]T |
null |
|
>>map[K]V |
null |
|
>>object |
null |
|
>>minmax |
{min/max: zero} |
|
>>wtpool |
null |
|
>>tuple |
null |
|
>>vector |
{x/y/z/w: zero} |
|
| Multi-Column Types | []T |
null |
[N]T |
null |
|
map[K]V |
null |
|
minmax |
{min/max: zero} |
|
wtpool |
null |
|
tuple |
null |
|
vector |
{x/y/z/w: zero} |
|
bitflags |
0 |
|
| Subtable Types | **[] |
null |
**[N] |
null |
|
**map |
null |
|
| Behavior Types | anchor |
"" |
assert |
true |
|
condition |
true |
|
switch |
"" |
|
placeholder |
— | |
| Non-Leaf Types | [] |
null |
[N] |
null |
|
map |
null |
|
{} |
null |
|
minmax |
{min/max: zero} |
|
wtpool |
null |
|
vector |
{x/y/z/w: zero} |
Note: The zero values of certain data types may differ slightly in representation from what is listed in the table, but their semantics remain unaffected. For example, duration is listed as 0s, but actually appears as null.