From 2afb23928e1984d475cc460e1672e8f6fa0e4dbe Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 11 Aug 2021 17:21:31 -0400 Subject: Allow clicking on header to get fragment link --- docs/doc/syntax.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'docs/doc/syntax.html') diff --git a/docs/doc/syntax.html b/docs/doc/syntax.html index 98e09225..54271ab0 100644 --- a/docs/doc/syntax.html +++ b/docs/doc/syntax.html @@ -4,9 +4,9 @@ BQN: Syntax overview -

Syntax overview

+

Syntax overview

BQN syntax consists of expressions where computation is done with a little organizing structure around them like assignment, functions, and list notation. Expressions are where the programmer is in control so the design tries to do as much as possible with them before introducing special syntax.

-

Special glyphs

+

Special glyphs

The following glyphs are used for BQN syntax. Primitives (built-in functions and modifiers) are not listed in this table, and have their own page. Digits, characters, and the underscore _ are used for numbers, and identifiers or variable names.

@@ -102,9 +102,9 @@
-

Comments

+

Comments

A comment starts with # that is not part of a string and continues to the end of the line.

-

Constants

+

Constants

BQN has single-token notation for numbers, strings, and characters.

Numbers allow the typical decimal notation with ¯ for the negative sign (because - is a function) and e for scientific notation (or E, as numeric notation is case-insensitive). and π may be used as special numeric values. If complex numbers are supported, then they can be written with the components separated by i. However, no BQN to date supports complex numbers.

↗️
     ¯π  0.5  5e¯1  1.5E3      # A list of numbers
@@ -118,7 +118,7 @@
 ⟨ 1 0 ⟩
 

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

+

Expressions

More discussion

Like APL, BQN uses four syntactic roles for values in expressions: