China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-27 01:26
中国DOS联盟论坛 » 其它操作系统综合讨论区 » Strongly Requesting a Consolidated Thread on Logic View 919 Replies 1
Original Poster Posted 2007-03-31 01:06 ·  中国 广东 深圳 电信
中级用户
★★
Credits 379
Posts 95
Joined 2003-07-17 00:00
23-year member
UID 7038
Gender Male
Status Offline
What I know about cmd:
Arithmetic:
SET /A expression
The /A command switch specifies that the string to the right of the equal sign is a numeric expression to be evaluated. This expression
evaluator is very simple and supports the following operations in descending order of precedence:
() - grouping
* / % - arithmetic operators
+ - - arithmetic operators
<< >> - logical shift
- bitwise "and"
^ - bitwise "xor"
| - bitwise "or"
= *= /= %= += -= - assignment
&= ^= |= <<= >>=
, - expression separator
If you use any logical or remainder operator, you need to put the expression string
in quotes.
What does grouping mean? How is it used?
Also, how do you do rounding? And things like square roots...
Logical operators:
== equal sign
&& and
|| or
??? what about not equal?
set files=test.txt
!files==test.txt del /q test.txt and it still deleted it *_*
Isn't it like other scripts, with != and !== or <>
Do you have to use the English abbreviations of the symbols themselves?
If all this were made into a unified thread, it would be convenient for beginners like us...
thx!
Floor 2 Posted 2007-03-31 03:53 ·  中国 四川 成都 教育网
中级用户
★★
Credits 346
Posts 103
Joined 2004-04-06 00:00
22-year member
UID 21852
Gender Male
Status Offline
Search for algorithms
Forum Jump: