# Why am I not getting Indeterminate for f[1] when f[x_] = (x - 1)/(x - 1)? [closed]

In Mathematica 9 If I write:

f[x_] = (x - 1)/(x - 1)


I get

1


And if then I write:

f[1]


I get

1


But if I write:

(1 - 1)/(1 - 1)


I get:

Indeterminate


Why am I not getting Indeterminate for f[1] when f[x_] = (x - 1)/(x - 1) ?

What am I doing wrong?

-
Thanks to @Nasser comment, I found my mistake, I was using = instead of :=. The basic difference between these forms is when the expression is evaluated. = is an immediate assignment, which is evaluated at the time when the assignment is made. := on the other hand, is a delayed assignment, which is not evaluated when the assignment is made, but is instead evaluated each time its value is requested, more info here: http://reference.wolfram.com/mathematica/tutorial/ImmediateAndDelayedDefinitions.html