rhai/doc/src/appendix/literals.md
2020-10-05 23:02:50 +08:00

1.5 KiB

Literals Syntax

{{#include ../links.md}}

Type Literal syntax
INT decimal: 42, -123, 0
hex: 0x????..
binary: 0b????..
octal: 0o????..
FLOAT 42.0, -123.456, 0.0
[String] "... \x?? \u???? \U???????? ..."
[Character][string] single: '?'
ASCII hex: '\x??'
Unicode: '\u????', '\U????????'
[Array] [ ???, ???, ??? ]
[Object map] #{ a: ???, b: ???, c: ???, "def": ??? }
Boolean true true
Boolean false false
Nothing/null/nil/void/Unit ()