It is not necessary to give gosub() a return value just because it looks like a function. There are plenty of functions with no return value.Exaskryz wrote:But I wouldn't mind if GoTo (and GoSub) just don't have any return values if we do not need to worry about creating complete uniformity.
For the same reasons that you would use a sub in the first place. If you don't have any reasons, forget gosub and use functions.why not call a custom function instead, and grab your own return value?
Impossible, unless you want to overload the syntax so that this really isn't a function call and assignment, but special "goto" syntax. (Or use a ByRef parameter.) As I said, when Goto executes, execution transfers to the target label and does not return. The assignment would never execute.you could get the value of A_ThisHotkey logged into the variable starter with starter:=GoTo("label")
Anyway, this is what functions with parameters are for. Do not use goto like this.
Actually, your suggestion doesn't make any sense. How does the program know to put A_ThisHotkey into starter, from starter:=Goto("label")? You could just use starter:=A_ThisHotkey, Goto("label") if Goto was allowed inside an expression (it probably won't be).