You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>"Sided subscripts augment a modifier or function in a way that can be thought of as having a \"side\"."</p>
686
-
<p>"Sided subscripts are typed like normal subscripts with "<code>"__"</code>", but followed by "<code>"<"</code>" for left or "<code>">"</code>" for right. The formatter will turn them into "<code>"⌞"</code>" and "<code>"⌟"</code>" respectively."</p>
686
+
<p>"Sided subscripts are typed like normal subscripts with "<code>","</code>", but followed by "<code>"<"</code>" for left or "<code>">"</code>" for right. The formatter will turn them into "<code>"⌞"</code>" and "<code>"⌟"</code>" respectively."</p>
<p>"Normal "<A href="/docs/subscripts">"numeric subscripts"</A>" change the behavior of a function or modifier based on a number. There is another kind of subscripts that captures the idea of an operation having a certain \"orientation\" to the left or right."</p>
355
-
<p>"These "<em>"sided"</em>" subscripts use "<code>"⌞"</code>" to denote \"leftness\" or "<code>"⌟"</code>" to denote \"rightness\". They are formatted from the normal subscript "<code>"__"</code>" followed by a "<code>"<"</code>" or "<code>">"</code>"."</p>
355
+
<p>"These "<em>"sided"</em>" subscripts use "<code>"⌞"</code>" to denote \"leftness\" or "<code>"⌟"</code>" to denote \"rightness\". They are formatted from the normal subscript "<code>","</code>" followed by a "<code>"<"</code>" or "<code>">"</code>"."</p>
356
356
<p>"Currently, the only modifiers that support sided subscripts are "<Prim prim=Both/>" and "<Prim prim=Bracket/>". Instead of passing two separate sets of arguments to the modifier's function(s), one of the arguments will be passed to both function calls. Let's see some examples to get a better idea of how this works."</p>
357
357
<p>"Normal "<Prim prim=Both/>" calls its function on two sets of arguments."</p>
<p><em>"Warning"</em>": It is not guaranteed that any particular non-alphanumeric character will not be used for a built-in function in the future. Use them at your own risk. Emojis are safe though."</p>
655
655
<p>"Unlike most programming languages, binding names in "{lang}" "<em>"cannot"</em>" contain numbers or underscores."</p>
656
656
<Editor example="Variable_1 ← 5"/> // Should fail
657
-
<p>"Bindings "<em>"can"</em>" contain subscript numbers. These will format from "<code>"__"</code>" followed by some digits. Try formatting the example below!"</p>
658
-
<Editor example="X__1 = 5\nSha__256 = \"TODO\""/>
657
+
<p>"Bindings "<em>"can"</em>" contain subscript numbers. These will format from "<code>","</code>" followed by some digits. Try formatting the example below!"</p>
658
+
<Editor example="X,1 = 5\nSha,256 = \"TODO\""/>
659
659
<p>"Subscripts are only allowed at the end of a binding name."</p>
660
660
<p><strong>"Bindings are case-sensitive."</strong></p>
661
661
<p>"The parser can sometimes mistake all-lowercase binding names for unformatted built-in functions."</p>
<p>"Subscripts are a special syntax that allows you to augment some functions and modifiers with a number."</p>
849
-
<p>"Subscripts are typed with "<code>"__"</code>" followed by some digits. The formatter will turn them into subscript digit characters. A leading negative sign is allowed."</p>
849
+
<p>"Subscripts are typed with "<code>","</code>" followed by some digits. The formatter will turn them into subscript digit characters. A leading negative sign is allowed."</p>
850
850
<p>"Several functions and modifiers are supported, but we'll only cover some stack-related ones here. You can find a full list of subscript-compatible functions "<A href="/docs/subscripts">"here"</A>"."</p>
851
851
<p>"Subscripted "<Prim prim=Both/>" calls its function on N sets of arguments."</p>
Copy file name to clipboardExpand all lines: site/text/more_array.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ Needing [fix]() or `dipfix` with [rows]() is extremely common. However, it can b
93
93
94
94
For this reason, [rows]() supports *sided* subscripts. This syntax allows you to specify a "side" for a modifier or function.
95
95
96
-
Sided subscripts are typed with `__` followed by a `<` for left or a `>` for right. The formatter will turn them into subscript bottom corner characters.
96
+
Sided subscripts are typed with `,` followed by a `<` for left or a `>` for right. The formatter will turn them into subscript bottom corner characters.
97
97
98
98
Left [rows]()[fix]()es the first argument and right [rows]()[fix]()es the last argument.
99
99
@@ -108,7 +108,7 @@ A number can be specified after the side to [fix]() multiple arguments.
108
108
109
109
```uiua
110
110
# Try formatting!
111
-
≡__<2(⊂⊂) "ui" "ua" "ns"
111
+
≡,<2(⊂⊂) "ui" "ua" "ns"
112
112
```
113
113
114
114
While [fix]() is still necessary for certain complex cases, sided subscripts should work about 95% of the time.
0 commit comments