This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
harlowe:array [2017/06/19 01:08] l |
harlowe:array [2017/10/09 20:39] 127.0.0.1 external edit |
||
---|---|---|---|
Line 47: | Line 47: | ||
^ Operator ^ Purpose ^ Example ^ | ^ Operator ^ Purpose ^ Example ^ | ||
- | | `is` | Evaluates to boolean `true` if both sides contain equal items in an equal order, otherwise `false`. | `(a:1,2) is (a:1,2)` (is true) | + | |''%%is%%'' | Evaluates to boolean''%%true%%'' if both sides contain equal items in an equal order, otherwise''%%false%%''. |''%%(a:1,2) is (a:1,2)%%'' (is true)| |
- | | `is not` | Evaluates to `true` if both sides differ in items or ordering. | `(a:4,5) is not (a:5,4)` (is true) | + | |''%%is not%%'' | Evaluates to''%%true%%'' if both sides differ in items or ordering. |''%%(a:4,5) is not (a:5,4)%%'' (is true)| |
- | | `contains` | Evaluates to `true` if the left side contains the right side. | `(a:"Ape") contains "Ape"`, `(a:(a:99)) contains (a:99)`, `(a:1,2) contains any of (a:2,3)`, `(a:1,2) contains all of (a:2,1)` | + | |''%%contains%%'' | Evaluates to''%%true%%'' if the left side contains the right side. |''%%(a:"Ape") contains "Ape"%%'',''%%(a:(a:99)) contains (a:99)%%'',''%%(a:1,2) contains any of (a:2,3)%%'',''%%(a:1,2) contains all of (a:2,1)%%''| |
- | | `is in` | Evaluates to `true` if the right side contains the left side. | `"Ape" is in (a:"Ape")`, `(a:99) is in (a:(a:99))`, `any of (a:2,3) is in (a:1,2)`, `all of (a:2,1) is in (a:1,2)` | + | |''%%is in%%'' | Evaluates to''%%true%%'' if the right side contains the left side. |''%%"Ape" is in (a:"Ape")%%'',''%%(a:99) is in (a:(a:99))%%'',''%%any of (a:2,3) is in (a:1,2)%%'',''%%all of (a:2,1) is in (a:1,2)%%''| |
- | | `+` | Joins arrays. | `(a:1,2) + (a:1,2)` (is `(a:1,2,1,2)`) | + | |''%%+%%'' | Joins arrays. |''%%(a:1,2) + (a:1,2)%%'' (is''%%(a:1,2,1,2)%%'')| |
- | | `-` | Subtracts arrays, producing an array containing every value in the left side but not the right. | `(a:1,1,2,3,4,5) - (a:1,2)` (is `(a:3,4,5)`) | + | |''%%-%%'' | Subtracts arrays, producing an array containing every value in the left side but not the right. |''%%(a:1,1,2,3,4,5) - (a:1,2)%%'' (is''%%(a:3,4,5)%%'')| |
- | | `...` | When used in a macro call, it separates each value in the right side. | `(a: 0, ...(a:1,2,3,4), 5)` (is `(a:0,1,2,3,4,5)`) | + | |''%%...%%'' | When used in a macro call, it separates each value in the right side. |''%%(a: 0, ...(a:1,2,3,4), 5)%%'' (is''%%(a:0,1,2,3,4,5)%%'')| |
- | | `'s` | Obtains the item at the right numeric position, or the `length`, `any` or `all` values. | `(a:"Y","Z")'s 1st` (is "Y"), `(a:4,5)'s (2)` (is 5), `(a:5,5,5)'s length` (is 3) | + | |''%%'s%%'' | Obtains the item at the right numeric position, or the''%%length%%'',''%%any%%'' or''%%all%%'' values. |''%%(a:"Y","Z")'s 1st%%'' (is "Y"),''%%(a:4,5)'s (2)%%'' (is 5),''%%(a:5,5,5)'s length%%'' (is 3)| |
- | | `of` | Obtains the item at the left numeric position, or the `length`, `any` or `all` values. | `1st of (a:"Y","O")` (is "Y"), `(2) of (a:"P","S")` (is "S"), `length of (a:5,5,5)` (is 3) | + | |''%%of%%'' | Obtains the item at the left numeric position, or the''%%length%%'',''%%any%%'' or''%%all%%'' values. |''%%1st of (a:"Y","O")%%'' (is "Y"),''%%(2) of (a:"P","S")%%'' (is "S"),''%%length of (a:5,5,5)%%'' (is 3)| |