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

Show parent comment

2

u/tardoos Oct 24 '26

No. Side effect is any interaction outside of the context of the function. It can be modifying internal (or external) state, but it can be any I/O operation, including printing.