dread Posted February 25, 2008 Share Posted February 25, 2008 Does it matter if the whole word or the first letter of each word is capitalized? I see some people use all caps and some use no caps and some only capitalize the first letter of each word. Link to comment Share on other sites More sharing options...
ricktendo Posted February 25, 2008 Share Posted February 25, 2008 (edited) Nope, caps wont make any difrence. You could even use caps in the VARIABLE= and no caps in the %variable% of a CMD file and all will be OKIn paths to places on your HDD "%ProgramFiles%", "%PROGRAMFILES%" and "%programfiles%" are all the same (just a matter of taste) Edited February 25, 2008 by ricktendo64 Link to comment Share on other sites More sharing options...
MHz Posted February 25, 2008 Share Posted February 25, 2008 For the purpose of identification of variables in cmd scripts, using all caps helps you to know that you are using a valid variable within your script. A small script is easy to manage but as they get bigger, then stricter control of variables is needed to save mistakes. It also helps with in programming editors that can invoke an autocomplete box with a selection of items and so if you choose an item with all caps then you know that it is a variable.@echo offset VARIABLE=stringecho Contents of the variable is %VARIABLE%pauseAs shown above, I can identify the variable clearly used so confusion is avoided. The lower case use of variable is just a string. It is not a concept from the book of cmd scripting (if the book even exists) but it is simply a concept that I choose to use. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now