Skip to main content

◇ — Separator

Syntax. Keys: Alt-Backtick. Hanzi: 句

At statement level, ◇ separates expressions. Everywhere, a line break means ◇, unless it’s next to a bracket, parenthesis, brace, ;, ◇ or ?.

x←2 ◇ y←3 ◇ x+y    ⍝ 5

Inside brackets, ◇ separates major cells. With a trailing ◇, the result is an array of one major cell. A single number is a cell of rank 0: [42◇] is a one-item vector.

[1 2◇3 4]        ⍝ 2 2ρ1 2 3 4
ρ[1 2◇]           ⍝ [1 2]ₓ
ρ[42◇]            ⍝ [1]ₓ

Inside parentheses, ◇ separates rows, and the result is a vector with one item for each row. Each item is a vector, even for a row with one item.

(1 2◇3)          ⍝ [[1 2] [3]]

Types of brackets compares ◇ in brackets, parentheses and braces.