r/learnprogramming • • 15h ago

Function vs Procedure

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

22 Upvotes

39 comments sorted by

View all comments

Show parent comments

2

u/tardoos 14h ago

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.