Sorry for replying in 2 installments but I needed to get it off my chest...
On Sun, 27 Oct 2002 10:30:35 -0500 (EST) Mathieu Bouchard matju@sympatico.ca wrote:
(x<<n)|y is the same as (x<<n)+y when y is smaller than 1<<n (and not negative). in a more general situation, however, ORing would not be inversible. (I don't know why | was used instead of + here; + is clearer)
I got the '|' instead of '+' from this code: (http://home.planet.nl/~roosp/mt_pitch.html)
unsigned short CombineBytes(unsigned char First, unsigned char Second) { unsigned short _14bit;
_14bit = (unsigned short)Second; _14bit<<=7; _14bit|=(unsigned short)First; return(_14bit); }
of course I should have looked into Krzysztof's source for xeq_parse first (which I did while I was downloading my messages which already included the solution) and there the '+' is used and, of course, it is clearer. reversing the addition _is_ simple :)
Thanks a lot.