Building Expressions Using the Space Object
The simplest use of the autocomplete popup is to just put an object into the currently highlighted location in an expression. But the autocomplete popup can also be used to make a highlighted term in an expression the first parameter in a newly inserted parent term.
As an example, using the Space object and the autocomplete lets you easily change the expression:
x + y = 0
into the expression:
| x + y | = 0
- Highlight the "x + y" term
- Press the spacebar - note that this creates the Space object with "x + y" in the first parameter and an empty box (highlighted) as the second parameter
- Type "abs". This opens the autocomplete popup
- Select the Abs object from the autocomplete popup
Note that the Space object disappears when you select Abs from the autocomplete popup. The Space object is only intended to be used as a placeholder that is used by the autocomplete popup. It's removed when the Abs value object is constructed.
Pressing the spacebar while creating expressions creates the Space object, which acts as a placeholder for selecting the new operand. Note that when the Space object is used, the originally highlighted term becomes the first parameter of the expression. For example, typing x space gte followed by pressing the Enter key results in the expression x ≥ [], while typing gte into an empty box followed by pressing the enter key results in the expression [] ≥ [], with the first object highlighted.
This means that there are two ways to create expressions like x ≥ 0.
Method 1:
- Double-click to create an empty box
- Type GTE to open the autocomplete menu and select the [] ≥ [] object
- Type x
- Use the right arrow to move to the other box and type 0.
Method 2:
- Double-click to create an empty box
- Type x, then press the space bar
- Type GTE to open the autocomplete menu and select the x ≥ [] object
- Type 0.