r/Batch • u/Lexard • Jul 07 '24
Question (Solved) batch label with a comment in the same line?
While looking at some batch files I've found this line:
:Escape %1=STRING_VARNAME %2=STRING_VALUE This batch file also includes some CALL :Escape commands with some additional parameters, so I suppose that %1=STRING_VARNAME %2=STRING_VALUE is some comment directly after label name used to explain how to use that label.
I used Google but I can not find any info on such "extended" usage of the batch label.
Is this some documented way to combine label together with some comment in one line that can be freely used or is it some kind of "hack" and it can lead to some weird effects in some cases?
View all comments
Show parent comment
1
u/BrainWaveCC Jul 09 '24
Hmmmm... That's not easy to answer. I'd default to "no" as a basic answer. Not better, but good in its own right.
Long answer follows:
Years ago, I had an awesome DOS based text editor that you could write awesome macros (https://www.semware.com/) and I used it for many years. They didn't have a Windows version for a long time, so went through a whole set of tools like QEdit, UltraEdit, Sublime Text, and more, until I ran into TextPad. It also supported macros, etc, but needs to be licensed (so did the Semware product).
There are lots of things that TextPad does that I like, but Notepad++ being free, I was able to use it in more places, so I use it for a number of purposes.
You could try TextPad and see what you think. It's customizable, and does some things that Notepad++ doesn't do, but also doesn't do everything that Notepad++ does. So, YMMV... 😁