TIO refers to Try it online! while ATO refers to Attempt This Online!.

Used by Wolfram expressions.

Logical And(any, any). Returns the LHS unless it is falsy, in which case it evaluates the RHS.

Logical Or(any, any). Returns the LHS if it is falsy, otherwise it evaluates the RHS.

Starts a compressed string, which is a separate token from ASCII strings.

“y

Starts a literal string (a string containing these command characters, excluding , or ⸿). (TIO: or ⸿ will also be quoted, but the deverbosifier erroneously converts \n or \r.)

Ends a compressed or literal string. Optional at the end of the program.

Push(list, any);. Appends the value to the list.

⊞O

PushOperator(list, any). Appends the value to the list and returns the list.

Pop(list). Removes and returns the last element of the list.

Used by Wolfram expressions.

Used by Wolfram expressions.

Used by Wolfram expressions.

\n. Literal newline character; counts as part of an ASCII string literal. When printed to the canvas, causes the cursor to move to the start of the next "line" below the cursor position at the start of the print command.

Used by Wolfram expressions.

PivotLeft(int=2);. Rotates the pivot anticlockwise by 45° times the argument.

PivotRight(int=2);. Rotates the pivot clockwise by 45° times the argument.

Rotate(int=2);. Rotates the canvas anticlockwise by 45° times the argument.

⟲T

RotateTransform(int=2);. Rotates the canvas anticlockwise by 45° times the argument, rotating the characters if possible.

⟲C

⟲P

As RotateCopy but rotates the characters if possible.

⟲O

As RotateCopy but rotates around the character in the corner (so that the rotated character overlaps itself).

⟲OO

As RotateOverlap but specifies the amount of overlap.

⟲S

As RotateOverlap but rotates the characters if possible.

⟲SO

As RotateShutter but specifies the amount of overlap.

Also used as a direction parameter to other commands.

Also used as a direction parameter to other commands.

Also used as a direction parameter to other commands.

Also used as a direction parameter to other commands.

Ternary(any, any, any). Evaluates the second or third argument depending on whether the first argument is falsy.

±

Also used as a direction parameter to other commands.

Also used as a direction parameter to other commands.

Also used as a direction parameter to other commands.

Also used as a direction parameter to other commands.

Used by Wolfram expressions.

Join(str, iter). Converts the the elements of the second argument to string and joins the latter using the former. (ATO: Also converts the first argument to string.)

PadLeft(str, int). Pads the first argument with spaces if its length is less than the second argument.

PadRight(str, int). Pads the first argument with spaces if its length is less than the second argument.

switch (any) { case:s... (default:) }

≡«

Like switch but uses a closing » to mark the end of the switch statement. (Technically the closing » is optional at the end of the program but in that case you would simply omit the «.) Use switch_delimited in Verbose mode. (Not available on TIO.)

⸿

\r. Literal carriage return character; counts as part of an ASCII string literal. When printed to the canvas, causes the cursor to move to the start of the next line.

Assign(any, var);.

§≔

AssignAtIndex(list, int, any);. Updates an element of a dictionary, or of a list (including list of cells) using cyclic indexing.

GetVariable(str). Gets a Charcoal variable indirectly by succinct name or a Python constant such as math.tau.

ExecuteVariable(str, list);. Executes the named Python function, passing it the given arguments.

Σ

Π

✳✳

Directions(list). Represents a computed multidirectional given by the elements of the list as individual direction arrows.

X(). Returns the X-coordinate of the cursor position on the canvas.

Y(). Returns the Y-coordinate of the cursor position on the canvas.

⌕A

Clear();. Clears the canvas and moves the cursor to the origin, but does not change other settings such as the pivot direction.

¬

Not(any). Returns 1 if the value is falsy, 0 otherwise.

Φ

§

AtIndex(iter, int). Cyclically indexes into the iterable. (TIO: Returns the empty string if the result would be the null character.)

§≔

AssignAtIndex(list, int, any);. Updates an element of a dictionary, or of a list (including a list of cells) using cyclic indexing.

«

Begins a block or a lambda.

»

Ends a block or lambda. Optional at the end of the program.

×

·

Used as the decimal point in a floating-point literal.

÷

⁰¹²³⁴⁵⁶⁷⁸⁹

Used to create integer and floating-point literals.

¦

Used to separate consecutive integers or strings or as placeholders for optional arguments.

Reflect(dir=→);. Reflects the canvas in the specified direction.

‖T

ReflectTransform(dir=→);. Reflects the canvas in the specified direction, reflecting the characters if possible.

‖C

ReflectCopy(dirs=→);. Reflects the canvas in each specified direction in turn, adding the reflected copy to the canvas after each reflection.

‖M

ReflectMirror(dirs=→);. As ReflectCopy but reflecting the characters if possible.

‖O

ReflectOverlap(dirs=→);. As ReflectOverlap but reflects around the edge characters (so that the reflected axis overlaps itself).

‖B

ReflectButterfly(dirs=→);. As ReflectOverlap but reflecting the characters if possible.

‖OO

ReflectOverlapOverlap(dirs=→, num);. As ReflectOverlap but specifies the amount of overlap.

‖BO

ReflectButterflyOverlap(dirs=→, num);. As ReflectOverlapOverlap but reflecting the characters if possible.

Equals(any, any).

¿

Note that the first form is only possible at the end of a block or program.

KA

PeekAll(). Returns a list of all the non-background cells in the canvas. Cells can be assigned to using AssignAtIndex.

‖B

ReflectButterfly(dirs=→);. As ReflectOverlap but reflecting the characters if possible.

‖BO

ReflectButterflyOverlap(dirs=→, num);. As ReflectOverlapOverlap but reflecting the characters if possible.

UB

SetBackground(str);. Sets the string that should fill the background when the canvas is output. Defaults to a space.

Copy(int, int);. Overlays the canvas with a copy of it offset by the given horizontal and vertical amounts.

‖C

ReflectCopy(dirs=→);. Reflects the canvas in each specified direction in turn, adding the reflected copy to the canvas after each reflection.

Dump();. Outputs a copy of the canvas to standard output. Delays by 10ms since the last dump. (ATO: Use --nt to disable the delay.)

KD

PeekDirection(int, dir). Returns a list of the cell under the cursor and continuing in the given direction up to the given length. Cells can be assigned to using AssignAtIndex.

GH

See GH.

JumpTo(int, int);. Moves the cursor to the given absolute position.

KA

PeekAll(). Returns a list of all the non-background cells in the canvas. Cells can be assigned to using AssignAtIndex.

KD

PeekDirection(int, dir). Returns a list of the cell under the cursor and continuing in the given direction up to the given length. Cells can be assigned to using AssignAtIndex.

KK

Peek(). Returns the character under the cursor.

KM

PeekMoore(). Returns a list of the cells orthogonally and diagonally adjacent, starting with the cell above and to the left and working clockwise around the cursor. Cells can be assigned to using AssignAtIndex.

KV

PeekVonNeumann(). Returns a list of the cells orthogonally adjacent, starting with the cell above and working clockwise around the cursor. Cells can be assigned to using AssignAtIndex.

Length(iter). Returns the length of the iterable.

UM

MapCommand(iter, any);. Maps over the elements of the argument and updates the argument if possible. (Does not work on dictionaries on TIO.)

⊞O

PushOperator(list, any). Appends the value to the list and returns the list.

Unused.

Refresh(int=0); Displays the canvas to the screen, but with an optional delay since the last refresh.

RW

RefreshWhile(any) Loops while the argument is true, saving it in the next loop variable, but displays the canvas at every step, with the given delay. The argument is evaluated after the RefreshWhile loop variable is reserved.

RF

⟲T

RotateTransform(int=2);. Rotates the canvas anticlockwise by 45° times the argument, rotating the characters if possible.

‖T

ReflectTransform(dir=→);. Reflects the canvas in the specified direction, reflecting the characters if possible.

UT

ToggleTrim();. Toggles whether the canvas output is right-padded (default true).

UB

SetBackground(str);. Sets the string that should fill the background when the canvas is output. Defaults to a space.

UE

UM

MapCommand(iter, any);. Maps over the elements of the argument and updates the argument if possible. (Does not work on dictionaries on TIO.)

UO

UR

UT

ToggleTrim();. Toggles whether the canvas output is right-padded (default true).

UV

PythonEvaluate(). Evaluates the string as Python code.

UX

PythonExecute(str). Executes the string as Python code.

KV

PeekVonNeumann(). Returns a list of the cells orthogonally adjacent, starting with the cell above and working clockwise around the cursor. Cells can be assigned to using AssignAtIndex.

UV

PythonEvaluate(). Evaluates the string as Python code.

while (any) Loops while the argument is true, saving it in the next loop variable. The argument is evaluated after the while loop variable is reserved.

RW

RefreshWhile(any) Loops while the argument is true, saving it in the next loop variable, but displays the canvas at every step, with the given delay. The argument is evaluated after the RefreshWhile loop variable is reserved.

UX

PythonExecute(str). Executes the string as Python code.

Unused.

Unused

Begins a list.

Ends a list. Optional at the end of the program.

…·

´

Quotes a command character, allowing it to be used as part of an ASCII string literal.

αβχδεφγηικλμνπθρστυςωξψζ

Variables. αβχφγυωψ have predefined values. ικλμνξπρςστδεζηθ are used by loop variables, if possible. (Note that expression loops consume two variables, one for the value and one for the index.) θηζεδ attempt to retrieve the first five inputs, if not being used as loop variables. (TIO: θηζεδ can only be used as loop variables.)

¤

Fill(str);. If the cursor is in an empty space, fills that space with the given string, repeating as needed.

Begins a dictionary.

Ends a dictionary. Optional at the end of the program.

BitwiseNot(int).