The Question Command
The Question command is designed to make it faster and easier to construct some kinds of expressions. For example, if you are creating or editing a Graph expression, the question command can be used to pop up lists of objects that can be inserted in the current location. If there is a single empty box in the parameter of the Graph object and you use the Question command, the list that is shown will contain all of the components of a graph. The keystroke for the Question command is the "?" character.
The Question command and the Equivalence command are both used as a place to put things that don't fit naturally in any of the other commands. The difference is that the Equivalence command is intended to only generate an expressions that are equal to the starting expression. The Question command typically doesn't generate an expression that is equal to the starting expression. The Question command is used primarily when creating and editing expressions.
The Question command is used in several cases, it's used to "fill in the blank" when the empty box is normally replaced by one of a limited number of predefined choices. For example, anywhere that an empty box must be of type Color, you can use the Question command to bring up a list of colors.
Examples where the question command can be used to "fill in the blank" include:
- Adding components to a graph.
- Adding properties to some of the components of a graph.
- Adding components to a Rendering: expression.
- Selecting one of the command parameters in a Command definition.
- Selection the modifier (Ctrl, Alt, Shift) or the key in a Keystroke object.
- Selecting a color in any of the color properties.
- Changing the namespace of an undefined object.
- Adding a hat, bar, tilde, or prime to an expression.
Note that the list of colors doesn't include all of the colors that could be used in a parameter that expects a color.
The Question command can also be used to assist in creating expressions. For example, if you want to put a hat, bar, etc. above a term, the Question command can be used to show a list of options.
In addition, the Question command can be used to correct type errors. For example, if you create a Mult object with x in the first parameter and copy a derivative operator into the second parameter, you will have a type error on the derivative operator. If you now highlight either the derivative or the whole Mult object and apply the Question command (?) the Mult object will be converted to a Product object which will eliminate the type error.