Originally posted by yardian at 2006-10-21 11:09:
Looking at this, it doesn't equal !=%,. But why use ! instead of %?
This ! and % can't be fully explained in a few sentences.
The difference between ! and % and when to use them can't be intuitively determined,
Not entirely because their help isn't clearly written,
The main problem is:
If there are complex assignments of various variables in SET, and values need to be passed during assignment.
And if you encounter assigning values to variables in a for loop, and the values to be assigned are variables...
A large number of variables are used inside and outside the FOR, assigning values to each other, passing values...
There are also a large number of letter or variable separation operations, operating inside or outside the for...
There are also differences between SET /A and SET A=B similar assignments, etc...
And so on. If you usually only write a few batch processing or use them very little,
Then the problem of! and % may not be encountered often, or if encountered, you don't know how to solve the problem of! and %,
The main reason is:
The above series of contents are interconnected. If you learn DOS too fast, you may have lost or not thoroughly studied before starting to compile more advanced contents.
Jumping learning and too fast learning speed, and sometimes we often ignore the most basic contents such as SET FOR in order to save time,
Resulting in the more you learn and apply later, the more proficient the basic knowledge points required are :)
Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._