Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
miskox
- Posts: 668
- Joined: 28 Jun 2010 03:46
#1
Post
by miskox » 26 Feb 2015 15:43
This has been asked in the past (also by myself) but I would like to have this information in one place for all the different operations:
I would like someone to explain these operations we see in some programs:
I tried with a loop to see what happens and I see that the code above calculates the remainder.
Code above is the same as:
Code: Select all
set /a aa=cnt / 100
set /a remain=cnt - aa * 100
Please help and then we can post them all in one post. I think I remember someone saying that these operations are from 'C'?
Thanks.
Saso
-
ShadowThief
- Expert
- Posts: 1167
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
#2
Post
by ShadowThief » 26 Feb 2015 15:47
You just explained the modulus operator perfectly. What's your question?
-
miskox
- Posts: 668
- Joined: 28 Jun 2010 03:46
#4
Post
by miskox » 03 Mar 2015 12:44
ShadowThief wrote:You just explained the modulus operator perfectly. What's your question?
I wanted to know what are all possible operators (with the explanation). And I see Squashman provided very useful link.
Thanks.
Saso