Greetings,(adsbygoogle = window.adsbygoogle || []).push({});

I recently discovered Mathematica's Format function, and it has been of great use to me. However, there is one thing that I want to use it to do, that I have yet to be able to. I could do this easily, though, if there is some Mathematica function that works as follows...

If I put a semicolon after inputting something in Mathematica, it evaluates what I input without outputting the result. The function that I am looking for is sort of the inverse of this.

I will call the function DoNotEvaluate[] for the rest of this post. Some simple input and output examples for the function that I am looking for would be...

Input: DoNotEvaluate[Sqrt[4]]

Output: Sqrt[4] - note that the output is not 2.

Input: DoNotEvaluate[Sqrt[2*2]]

Output: Sqrt[2*2] - note that the output is neither Sqrt[4] or 2.

Input: x=2*2; DoNotEvaluate[Sqrt[x]]

Output: Sqrt[4]

Does anyone know of a Mathematica function, or other Mathematica technique, that does what my made-up DoNotEvaluate[] function does?

Thanks for any help you can give.

-HJ Farnsworth

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Mathematica: output an expression without evaluating it first

Loading...

Similar Threads for Mathematica output expression |
---|

Mathematica Storing Mathematica output |

Mathematica Mathematica to MATLAB |

Mathematica Cannot do the integral of the Hyper-geometric function? |

Mathematica Cannot Plot This Function in Mathematica |

Mathematica While Loop in Mathematica |

**Physics Forums | Science Articles, Homework Help, Discussion**