comp.lang.ada
 help / color / mirror / Atom feed
* crc and Ada
@ 2003-05-18  7:04 Bartłomiej Ś.
  2003-05-18  7:27 ` John R. Strohm
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Bartłomiej Ś. @ 2003-05-18  7:04 UTC (permalink / raw)


Hello,
I'm starting in Ada, and I can't use same operators (like xor, and) in
my programs. I need to count crc. In Java I was writting:
#v+
...
crc=(crctable[((crc>>8)^bufor[start+i++]) & 0xFF]^(crc<<8))&0xFFFF;
...
#v-
What I should use instand of 'xor' and 'and' oparator (becouse in Ada
they are logical oparator, not binary). For example, I replace crc<<8 by
crc*256, and crc>>8 crc/256, but what about xor?

-- 
Best regards,         PGP: http://wilk.wpk.p.lodz.pl/swierczu/pgp
Bartek.               http://sknauk.wpk.p.lodz.pl  



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-05-19  9:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-18  7:04 crc and Ada Bartłomiej Ś.
2003-05-18  7:27 ` John R. Strohm
2003-05-18  7:38 ` Martin Krischik
2003-05-18  7:49 ` Martin Dowie
2003-05-18  7:56 ` tmoran
2003-05-18  9:35   ` Bartłomiej Ś.
2003-05-18  8:05 ` Tarjei T. Jensen
2003-05-19  9:09 ` Ludovic Brenta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox