1.

Solve : Batch "book" needs editing?

Answer»

So I spent the last while (something like 2 months) compiling all of my knowledge of Batch into a "book". The good majority of it is probably wrong. I was wondering if you guys would mind reading a BIT of it, and pointing out any errors or mistakes I may have. I don't expect anyone to read the whole thing (23 pages), but even a chapter would help immensely.

Thanks so much guys!

[year+ old attachment deleted by admin]Just did a quick skim of the first chapter and the code EXAMPLES. Might read it some more tonight. Here is what I noticed on my lunch break.

  • (Spelling) VERIABLE
  • Quote
    Whereas REM is a command, '::' is simply not compiled (convert written code to code that the computer can understand) with the script. This means that when run, '::' is nowhere in the program."
    :: is a hack to the label : modifier and batch is not compiled. Batch is passed to the cmd.exe parser line by line and interpreted. Therefore, the :: is still passed to the parser but is processed as a label, essentially ignoring it; while the rem is passed to the parser and is executed as the rem command.
Quote from: DigitalSnow on January 15, 2013, 11:07:59 AM
Just did a quick skim of the first chapter and the code examples. Might read it some more tonight. Here is what I noticed on my lunch break.
  • (Spelling) VERIABLE
Oops... Can't believe I made that mistake.
Quote from: DigitalSnow on January 15, 2013, 11:07:59 AM
  • :: is a hack to the label : modifier and batch is not compiled. Batch is passed to the cmd.exe parser line by line and interpreted. Therefore, the :: is still passed to the parser but is processed as a label, essentially ignoring it; while the rem is passed to the parser and is executed as the rem command.
I didn't know that. Thanks, I'll be sure to make the changes. Not sure if you ever heard of the M.U.F's listing before, but there is a Microsofts Undocumented Features txt file out on the net that has a list of neat features that have been discovered. Worth looking into if you haven't already. Some undocumented features still work, while others are degraded or no longer active. Might be something to add link to in your book for anyone who might need a DOS command to do something special in a batch file. This hasn't been updated in years though, and any use of such instructions is at own risk: http://archive.hmvh.net/txtfiles/it/MUF15.TXTQuote
If you've read many of these books, this SECTION is usually used to explain the inner workings of a computer and it's history.

There should not be an apostrophe in its.

Quote
Any word (or string of characters) beginning with a single colon ( [but not two] is what I like to call a 'flag'.

I like to call them 'labels', like Microsoft does.

Quote
but to that my friend I say Nay!

I think you need to develop a more serious and formal English style, and also there are lots and lots of spelling mistakes.



Quote from: DaveLembke on January 15, 2013, 03:13:54 PM
Not sure if you ever heard of the M.U.F's listing before, but there is a Microsofts Undocumented Features txt file out on the net that has a list of neat features that have been discovered. Worth looking into if you haven't already. Some undocumented features still work, while others are degraded or no longer active. Might be something to add link to in your book for anyone who might need a DOS command to do something special in a batch file. This hasn't been updated in years though, and any use of such instructions is at own risk: http://archive.hmvh.net/txtfiles/it/MUF15.TXT
I have not heard of it, but will look into it. Thanks!

Quote from: Salmon Trout on January 15, 2013, 03:32:48 PM
I like to call them 'labels', like Microsoft does.
I mainly learned from analyzing pre-written code, so I never did learn the names for THINGS. Thanks.

Quote from: Salmon Trout on January 15, 2013, 03:32:48 PM
I think you need to develop a more serious and formal English style, and also there are lots and lots of spelling mistakes.
I was trying to make it informal. I figured it would help readers (who don't know much about code/scripts) to better understand how things worked. I was also trying to make it more engaging, I know that the c++ book that I am working through right now, uses lots of fancy words, and its dead dry.

And I was expecting the spelling mistakes, I hope it wasn't too much of a distraction.Quote from: Lemonilla on January 15, 2013, 07:21:35 PM
I was also trying to make it more engaging

For many readers, an excessively chatty style, coupled with a zillion spelling mistakes says "I'm aged 13!" and makes it less engaging.


Discussion

No Comment Found