Discussion forum for all Windows batch related topics.
- Posts: 61
- Joined: 02 Jun 2011 11:29
- Location: USA - Somewhere between Albany NY and Bennington VT
orange_batch wrote:Haha hold on, you misread what I said
Yeah, I do that a lot.
I suppose that removal of the comments would tend to speed up the processing of long scripts - even double-colon comments which I understand are completely ignored by the interpreter. Double-colon comments don't work inside IF statements anyway. Still, in a production environment, you want a backup copy of the code to check for changes by someone else. Keeping a copy of fully commented code, a copy of uncommented code plus the uncommented production copy might get cumbersome - especially if you have many scripts. The purpose of comments is so that anyone can look at the code and see what the app is trying to do. I think that clarity of code far outweighs any speed gains you might get through comment removal.
- Posts: 442
- Joined: 01 Aug 2010 17:13
- Location: Canadian Pacific
Yeah, long scripts. It should speed up the goto command at least.
My current project keeps fluctuating as I add and remove modules but at the moment the main script is 30,984 bytes (921 lines) including comments, blank lines and all.
- Posts: 1569
- Joined: 16 May 2011 08:21
- Location: Flanders(Belgium)
shadeclan wrote:I suppose that removal of the comments would tend to speed up the processing of long scripts
I like to comment by using a variable that indicates how something is used,
The next line will validate the code by executing it, and the validation can be easily turned off.
Code: Select all
use: ( %%%$defines%%% r#var, r#val, #sErr ) %$n1c%
con: Contents of $var %$n1c%
err: 0 for succes, 1 for error "
Code: Select all
rem turned off validation ( %sharePath.declare_% $ed-serv, "\\ed-serv-0\ed-serv-0", 1 )
I prevent function slowdowns by not including much comment in that