Show the output of defining a function

Hi,

Do you know how to let mathematica show the output when you are defining a function? I’m using Mathematica 10, and whenever i define a function, mathematica just shows input[1], and never gives the output[1], though the definition is executed successfully. I want to know how to let mathematica show the output. Thanks for your help! :slight_smile:

After you define f[x_]:= . . ., input f[x]

Oh, Thanks!

A correct way to look at the definition is with ?f.

If you define f[x_]=x^2 (without colon) you will see the output straight away.

If you define f[x_]:=x^2 (with colon) there is no output.

In most common situations the input f[x] will give the answer you expect, but not for example when f[x_]:=RandomReal[].

Look up SetDelayed and Set in the documentation.