"InactiveMathExpression" (Interpreter Type)
-
See Also
- Interpreter
- Restricted
- Failure
- Inactive
- Inactivate
-
- Interpreter Types
- MathExpression
- HeldMathExpression
- MathFormula
- Expression
- WolframLanguageSymbol
- HeldMathFormula
- InactiveMathFormula
- HeldExpression
- InactiveExpression
- SemanticExpression
- HeldSemanticExpression
- InactiveSemanticExpression
- ComputedWolframLanguageSymbol
- Related Guides
-
-
See Also
- Interpreter
- Restricted
- Failure
- Inactive
- Inactivate
-
- Interpreter Types
- MathExpression
- HeldMathExpression
- MathFormula
- Expression
- WolframLanguageSymbol
- HeldMathFormula
- InactiveMathFormula
- HeldExpression
- InactiveExpression
- SemanticExpression
- HeldSemanticExpression
- InactiveSemanticExpression
- ComputedWolframLanguageSymbol
- Related Guides
-
See Also
"InactiveMathExpression" (Interpreter Type)
Mathematical expression in natural language.
Details
- "InactiveMathExpression" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "InactiveMathExpression" requires connectivity to the Wolfram Cloud.
- "InactiveMathExpression" keeps its result unevaluated by wrapping it in Inactivate.
Restriction Specifications
-
Restricted["InactiveMathExpression",{{choice1,…}}] one among choices Restricted["InactiveMathExpression",symbols] an expression involving only the given symbols (All, Automatic, or an explicit list) Restricted["InactiveMathExpression",symbols,contexts] an expression involving only the given symbols or symbols in the given contexts (All, Automatic, or an explicit list) Restricted["InactiveMathExpression",symbols,contexts,resultcontext] an expression involving only the given symbols or symbols in the given contexts, where the new symbols are created in resultcontext
Interpretation
- "InactiveMathExpression" yields an Inactive Wolfram Language expression.
Examples
Basic Examples (6)
Interpret mathematical expressions:
Interpreter["InactiveMathExpression"]["int sin(y)-iy"]Interpreter["InactiveMathExpression"]["1.4x+3"]Interpreter["InactiveMathExpression"]["a = b+3"]Find out Wolfram Language representations of natural language queries:
Interpreter["InactiveMathExpression"]["second derivative of log x"]No evaluation is attempted when matching the choices:
Interpreter[Restricted["InactiveMathExpression", {{1, 2, 3, 4}}]]["two plus one"]Interpreter[Restricted["InactiveMathExpression", {{2, Inactivate[2 + 1]}}]]["two plus one"]By default, new symbols are created in $Context, but a custom context can be specified:
Interpreter[Restricted["InactiveMathExpression", All, Automatic, Automatic]]["y + 2"]
Context[y]Interpreter[Restricted["InactiveMathExpression", All, Automatic, "mycontext`"]]["k + 2"]
Context[k]Specify contexts for the allowed and output symbols:
mycontext`b = 10;
Interpreter[Restricted["InactiveMathExpression", Automatic, {"mycontext`", "System`"}, "mycontext`"]]["a+b"]
Context[a]Prevent the creation of any new symbol:
Interpreter[Restricted["InactiveMathExpression", Automatic, Automatic, None]]["3+1"]Interpreter[Restricted["InactiveMathExpression", Automatic, Automatic, None]]["z+1"]See Also
Interpreter Restricted Failure Inactive Inactivate
Interpreter Types: MathExpression HeldMathExpression MathFormula Expression WolframLanguageSymbol HeldMathFormula InactiveMathFormula HeldExpression InactiveExpression SemanticExpression HeldSemanticExpression InactiveSemanticExpression ComputedWolframLanguageSymbol
Related Guides
History
Introduced in 2014 (10.0)