definition of method in English wikipedia says it's a procedure associated with an object, and can also be called a member function . Static methods would be those associated with a class.
Often the terms function , method , procedure , routine and subroutine > are used interchangeably to refer to the same thing, but there are some nuances.
I see no difference between procedure , routine and subroutine . They are synonyms of a program-specific instruction sequence, which can be invoked from other locations.
A function refers to something that returns a value, analogous to mathematics. It would be a set of statements that returns a value at the end. A function is a procedure, but with this detail of the return more.
A method can be a procedure or function , but associated with an object or class. So it can be called a "member function".
Practical examples
Procedures are used in languages such as SQL (T-SQL, PL / SQL, etc.) for routines that do not return value. Already functions are used for routines that return values. The same goes for Visual Basic.
Several languages that have first class functions, such as Javascript, have the function declaration with the reserved word function
.
Object-oriented languages such as Java or C # always use the term method to refer to the procedures associated with classes.
In PHP, which is object-oriented and functional, the term function is used to refer to routines called directly in code, while the term method is reserved for the object-oriented part, which is nothing but functions within classes. PHP makes no difference between function that returns value or not.
Conclusion
Although I did not cite strong references from authors, I think the content of Wikipedia is consistent and the definitions make sense in general on all platforms I know.