# How do I combine evaluated expressions with unevaluated expressions

I want this function

PrintEvalExpr[Sin[Pi/2]]


Which outputs

Sin[Pi/2] == 1


I can either not evaluate, or evaluate but not at the same time, how do I combine them? My attempt would be something like

PrintEvalExpr[x_]:=Hold[x]==x


Except it doesn't work.

• printevalexpr[expr_] := expr == ReleaseHold[expr] , then use it like printevalexpr[HoldForm[Sin[Pi/2]]] – flinty Jul 4 at 21:46