Declined GOTO parameter

rps

Jul 6, 2008
440
6
Add optional variable to be passed to a GOTO statement, like what is available using GOSUB. example: GOTO label %parm. Don't really know how I would use this even if it is implemented.
 

rps

Jul 6, 2008
440
6
Thanks; I totally missed that in the docs.:oops:

Not exactly how I envisioned when I wrote the OP, but workable if your careful with where the label is placed in the overall batch file, since using this requires ending the label with quit, exit, cancel or the end of the batch file. :meh:

I will have to experiment a bit, just in case I ever need to use this feature in an actual btm.

Thanks again!! :happy:
 
Nov 2, 2008
246
2
I spent a good deal of time thinking how a gosub or goto might work with parameters. In essence, each time a goto or gosub is called, the parameter list would change. If you used %1-%9 here, you would have some difficulty reading what these mean.

You could also alias `return` to do the exit /b stuff.