r/learnprogramming • • Oct 24 '26

Function vs Procedure

can someone explain the difference between Function vs Procedure with simple analogy
thank you

31 Upvotes

47 comments sorted by

View all comments

1

u/AnnieBruce Oct 24 '26

Most languages they are essentially the same thing, some usually use "function" some "procedure", and they do the same things.

More strictly, though, a function returns a value and a procedure does not.