From 902ff84662cf39d044ada83c8b7d8ccf3b82bfbfc9ee19dfb3089f9e471ca894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Bj=C3=B6rnstam?= Date: Sun, 15 Nov 2026 11:26:01 +0100 Subject: [PATCH] Document string escapes, including \u{...} Co-Authored-By: Claude Opus 5.5 --- _01.Language-basics.sz | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_01.Language-basics.sz b/_01.Language-basics.sz index b01aaa6..e3f3e96 100644 --- a/_01.Language-basics.sz +++ b/_01.Language-basics.sz @@ -1917,6 +1917,8 @@ For the same reason there is no @code{string-ref} that takes an index. Finding t Characters are written @code{#\a}, @code{#\space}, @code{#\newline}. They can be compared with @code{<} and friends or @code{char=?}, converted with @code{char->int} and @code{int->char}, and classified with @code{char-alphabetic?}, @code{char-numeric?}, @code{char-whitespace?}, @code{char-upper-case?} and @code{char-lower-case?}. +In a string, a backslash begins an escape: @code{\n}, @code{\t}, @code{\r}, @code{\"} and @code{\\}, and @code{\u{...}}, a code point in 1 to 6 hex digits, as in @code{"caf\u{E9}"} or @code{"\u{1F600}"}. An interpolated string also has @code{\$}, a dollar sign that opens no hole. Any other escape is an error, so a backslash is written @code{\\}, or the text is written as a raw string, @code{"""..."""}, which has no escapes. A backslash at the end of a line continues the string on the next. A character can be written by its code point as well, as @code{#\xE9}. + @subsubsection{Common operations} @codeblock[#:lang "bjolang"]|{