diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-09-03 22:25:59 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-09-03 22:25:59 -0400 |
| commit | 22a33e01325ba2331a6b28dfc3d466c119d0834c (patch) | |
| tree | a53bb2a61cf97ed52e7ac1fefd494dbc7dc0636c /doc/syntax.md | |
| parent | ceaa82c6d1564b2ca7965c4f29b51f45ad1c2933 (diff) | |
Add the null character literal @
Diffstat (limited to 'doc/syntax.md')
| -rw-r--r-- | doc/syntax.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/syntax.md b/doc/syntax.md index 9c34bc2a..c74c3b2f 100644 --- a/doc/syntax.md +++ b/doc/syntax.md @@ -12,6 +12,7 @@ Glyph(s) | Meaning ----------------|----------- `#` | [Comment](#comments) `'"` | [Character or string literal](#constants) +`@` | [Null character](#constants) `¯∞π` | [Used in numeric literals](#constants) `()` | Expression grouping `←` | [Define](#assignment) @@ -48,6 +49,8 @@ Strings are written with double quotes `""`, and characters with single quotes ` ≡¨ ⟨ "a" ⋄ 'a' ⟩ # A string is an array but a character isn't +The null character (code point 0) has a dedicated literal representation `@`. This character can be used to directly convert between characters and numeric code points, which among many other uses allows tricky characters to be entered by code point: for example, a non-breaking space is `@+160`. The character can also be entered as a character literal, but this will display differently in various editors and some tools may have trouble with a file directly containing a null, so it is best to use `@` instead. + ## Expressions *[More discussion](context.md)* |
