| 1. |
Solve : Please, What does the @ do in the following example?? |
|
Answer» Thanks in advance! fav songs: that's your reward Dias. I'm to scared to click the links myself. My favourite song would be the "ewe overture" or "symphony of the Billy-Goats". I prefer the pictures though.Quote from: BC_Programmer on January 14, 2009, 04:04:15 PM Quote from: vmars on January 14, 2009, 03:39:56 PMfav songs: Cruel. I don't like those songs. I like Queen, Green Day, and Tim Powter.When you start talking with US "old-schoolers" you will hear some funny stories. I was working for ITT Servcom in the early 80's and I was in a bank presidents office one day when I noticed a bright colored DOS menu on his computer screen. I asked "How do you do that" and for the next hour, I sat there getting my first formal training in DOS batch file and menu creation, from a Bank President. A PRACTICAL use of the @ sign would be to blank out just one line, in a batch file where all the other lines are being echoed to the screen. When you start a batch file with Echo OFF, you put the @ sign at the start of the line so the command Echo Off won't be echo'ed to the screen. I was taught to put: @Echo Off cls at the beginning of every batch file. I do that to this very day. It clears the screen ( CLS ) and keeps it clean while the batch file runs, unless you instruct it to echo certain lines to the screen. For batch file testing, you MAY want to disable the @Echo Off command during the testing procedure. Then you can see if there are any error messages to your commands. To disable any line, just put two colons ( :: ) at the beginning of the line and DOS will totally ignore that line. If you use REM, then DOS will continue to read the entire line, even though it will not (usually) execute it. There are a few instances where the line or part of it MAY be executed, that's why I never use REM, but always the double colon. Now it's just a habit. Also, the batch file runs faster if DOS doesn't have to read the remark lines. Cheers Mates, keep up the good work! The Shadow Quote from: BatchFileCommand on January 14, 2009, 04:40:53 PM Quote from: BC_Programmer on January 14, 2009, 04:04:15 PMQuote from: vmars on January 14, 2009, 03:39:56 PMfav songs: I was of course joking Queen is my all time favourite band.Quote from: TheShadow on January 14, 2009, 05:07:59 PM To disable any line, just put two colons ( :: ) at the beginning of the line and DOS will totally ignore that line. If you use REM, then DOS will continue to read the entire line, even though it will not (usually) execute it. There are a few instances where the line or part of it MAY be executed, that's why I never use REM, but always the double colon. Now it's just a habit. I'm an old schooler myself, and I might just add that the undocumented unofficial use of a broken LABEL ( as a comment will break inside a FOR loop, which is why I never use it. |
|