To me, that's a procedure, not a function.
It's a pity that so few of our programming languages distinguish between these two quite different concepts.
It's a pity that so few of our programming languages distinguish between these two quite different concepts.
The only language I use that differentiates between functions and procedures is PostgreSQL, and to be honest I find the distinction pretty annoying in practice. One can return values, the other can control transactions. So when refactoring code you sometimes need to make a function a procedure or vice versa and it's a pain. (As a consequence, I try to always use functions to make things easier)