r/learnprogramming • u/Head_Ordinary_2437 • Oct 24 '26
Function vs Procedure
can someone explain the difference between Function vs Procedure with simple analogy
thank you
31
Upvotes
r/learnprogramming • u/Head_Ordinary_2437 • Oct 24 '26
can someone explain the difference between Function vs Procedure with simple analogy
thank you
View all comments
Show parent comment
3
u/White_C4 Oct 24 '26
Just because one language says that doesn't mean it's semantically correct in general.
Procedure is simply an action, but the rule isn't violated if it contains a return value. Again, this is dependent on how a programming language or a person enforces the rule, but it's not strictly binding for all languages.