You are not logged in.
Pages: 1
Topic closed
One of us is wrong, and I do not think it is me
see
http://ss64.com/nt/set.html
You say
LSH <<
RSH >>
I believe it because you say so, and also it is consistent with my many years programming in 'C'.
Further down you say something quite inconsistent to everything else, and also within itself
LSH Variable <<=
RSH Variable <<=
Regards
Alan
Offline
From the examples:
SET /A _result="2<<3"
(=16) { 2 Lsh 3 = binary 10 Lsh 3 = binary 10000 = decimal 16 }
If you then create a variable
SET _sample=2
SET /a "_sample<<=3"
(=16 and _sample now contains 16)
Offline
Unfortunately I was too concise / cryptic (take your choice)
Immediately after posting I realised this.
Regrettably I found there was no EDIT available so I hoped you would get my drift.
My concern is the apparent inconsistency between the two items in
LSH Variable <<=
RSH Variable <<=
That is two different names, i.e. LSH and RSH, both of which refer to the same bitwise operator
I would expect the truth to be two different directions of bit shifting operators , one per "name"
LSH Variable <<=
RSH Variable >>=
Regards
Alan
Offline
Ah, I see what you mean now, Thanks I'll fix up the page
(Also moving this topic to the meta section as its about the site rather than discussing CMD scripting)
Offline
Pages: 1
Topic closed