From 77c6ab5c8435c9fcde7c4742ee0e5eb06341eeff Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 7 Jul 2022 21:23:06 -0400 Subject: Separate token and constant documentation into its own page --- docs/doc/arrayrepr.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/doc/arrayrepr.html') diff --git a/docs/doc/arrayrepr.html b/docs/doc/arrayrepr.html index 159bb8f7..5218009e 100644 --- a/docs/doc/arrayrepr.html +++ b/docs/doc/arrayrepr.html @@ -162,7 +162,7 @@

The tutorial section here also covers this topic.

Now it's time to discuss ways to write arrays in a BQN program. There are three kinds literal notation for lists: strings, list notation, and stranding. Strings indicate character lists (with space for the fill) and the other two can combine any sequence of elements. Additionally, there's a square bracket notation that can form higher-rank arrays.

Strings

-

A string consists of a sequence of characters surrounded by double quotes "". The only rule for the characters inside is that any double quote must be escaped by repeating it twice; otherwise the string ends at that point.

+

A string literal consists of a sequence of characters surrounded by double quotes "". The only rule for the characters inside is that any double quote must be escaped by repeating it twice; otherwise the string ends at that point.

↗️
    "-'×%""*"
 "-'×%""*"
 
@@ -171,7 +171,7 @@
 

Even special characters like a newline can appear in a string literal, so that string literals are automatically multi-line.

Brackets

-

List notation uses angle brackets ⟨⟩. The contents are structurally identical to those of a block, that is, a list of expressions separated by , or or newlines. Unlike a block, a list doesn't need to have any expressions: ⟨⟩ or or ,,⋄, will create an empty list. Other differences are that a list doesn't introduce a new scope and all of the expressions have to result in a value, not Nothing (·).

+

List notation uses angle brackets ⟨⟩. The contents are structurally identical to those of a block, that is, a list of expressions separated by , or or newlines. Unlike a block, a list doesn't need to have any expressions: ⟨⟩ or or ,,⋄, will create an empty list. Other differences are that a list doesn't introduce a new scope and all of the expressions have to result in a value, not Nothing (·).

Entries in a list are evaluated in source order, and the value will be the list of those results. The list has a subject role, even if it contains expressions with other roles. Any value can be an element.

↗️
    @, ˘, "abc"
 ┌─              
-- 
cgit v1.2.3