Click here to Skip to main content
15,881,882 members

Comments by Frank Lindecke (Top 1 by date)

Frank Lindecke 18-Jul-12 1:59am View    
I would say, that a method belongs to an object and function not.
Therefore in object oriented languages keyword "this" (the "pointer" to the current object instance) provides us a context (the object instance).
So you can access other methods of this object.

A function is just a body of code with parameters and optional return value.
A method is a function with an additional "context".

More details can be found in every book about object oriented languages.

PS. In C++ we might call a method a function, but it is still a method, because we have the pointer to the object.