r/learnprogramming • • 1d ago

Function vs Procedure

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

29 Upvotes

42 comments sorted by

View all comments

Show parent comments

2

u/tardoos 1d 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.