Function always returns a value where as a
Sub does not. All methods in MAPBASIC can have side effects in the true term because it's not a functional language.
If you are expecting a return value you should use a
Function that is what they are there for.
Can you modify the value of
myParameter inside a
Sub and then just use it after. Yes. But this is messy and generally not good programming
Sometimes modifying a input variable is a way to have multiple outputs in languages that support multiple return types (in something like Python you can return as many things as you want)
An example might be:
Declare Function Convert(passed as Boolean) As string
Function Convert(passed as Boolean) As string
passed = True
Then you can check
passed after running the function.