Don't lay it on too thick now...

they are basically the same concept, except for an important distinction.

A function can accept values and can return a value. but basicaly think of it as building your own custom command, You pass a parameter(s) to it, and it performs a specific action based on/utilizing that value(s). what happens on the inside of the function is isolated (sort of) from the main body of the script.

If you tried hard enough you could make a gosub/return subroutine do the same sort of thing, but functions are much more efficient about it.

Consider it like this: In the great big book of everything, Gosubs are subroutines version 2. While Functions are subroutines Version 3 (goto is version 1, but no one wants to talk about those)
_________________________
How to ask questions the smart way <-----------> Before you ask